ID empty file via JCL

IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER
Derek
Posts: 1
Joined: Mon Jul 30, 2007 10:00 pm
Skillset: COBOL, JCL, CICS, VSAM, ~DB2, ~EZ-Trieve
Referer: Google
Location: Columbus, Ohio

ID empty file via JCL

Postby Derek » Wed Aug 15, 2007 6:00 pm

Is there a way, via JCL, to identify that a given input (QSAM) file is empty?

CICS Guy
Posts: 246
Joined: Wed Jun 20, 2007 4:08 am

Re: ID empty file via JCL

Postby CICS Guy » Wed Aug 15, 2007 6:11 pm

Only if you consider running a utility against it to open the file as "via JCL".......

User avatar
Frank Yaeger
Global moderator
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Skillset: DFSORT, ICETOOL, ICEGENER
Referer: Search
Contact:

Re: ID empty file via JCL

Postby Frank Yaeger » Wed Aug 15, 2007 8:08 pm

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.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort