Page 1 of 1

ID empty file via JCL

PostPosted: Wed Aug 15, 2007 6:00 pm
by Derek
Is there a way, via JCL, to identify that a given input (QSAM) file is empty?

Re: ID empty file via JCL

PostPosted: Wed Aug 15, 2007 6:11 pm
by CICS Guy
Only if you consider running a utility against it to open the file as "via JCL".......

Re: ID empty file via JCL

PostPosted: Wed Aug 15, 2007 8:08 pm
by Frank Yaeger
If by "identify" you mean pass back a non-zero return code, you can use the technique described in the "Set RC=12 or RC=4 if file is empty, has more than n records, etc" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/supp ... vs/tricks/

If that's not what you mean by "identify", then please explain what you do mean.