I do a print indataset for count(1) if the dataset is just catalogued I should 
get a non 0 return code

Can I use unix from a IDCAMS job ?

Sent from my iPhone

> On Mar 5, 2014, at 8:03 PM, Paul Gilmartin <[email protected]> wrote:
> 
>> On Wed, 5 Mar 2014 18:21:34 -0500, Micheal Butz wrote:
>> 
>> I have 2 files and would li[k]e to see
>> If one or both or none exist
>> 
>> I am using IDCAMS ...
> "exist" or "are nonempty"?
> 
> This is another thing it's ridiculously easy to do with z/OS UNIX:
> 
> File1="SYS1.MACLIB(SPLEVEL)"
> File2="SYS1.MACLIB(WAIT)"
> 
> Counts="$( cp -B "//'$File1'" /dev/fd/1 | head -c1
>       )$( cp -B "//'$File2'" /dev/fd/1 | head -c1 )"
> 
> case "$Counts" in
>    "") echo Both files are empty;;
>     ?) echo One file is non-empty;;
>    ??) echo Both files are non-empty;; esac
> 
> Why torture yourself?
> 
> -- gil
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to