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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to