View previous topic :: View next topic |
Author |
Message |
arunarao Beginner

Joined: 27 Dec 2005 Posts: 4 Topics: 2 Location: India
|
Posted: Wed May 17, 2006 12:05 am Post subject: Check for Empty file in JCL |
|
|
Hi,
I need to check if a file is empty or not in the JCL.
The only thing I could come up with was :
//DEL EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//FILEIN DD DSN=<file>,DISP=SHR
//SYSIN DD *
PRINT INFILE(FILEIN) CHARACTER COUNT(1)
This step gives a RC=4 if the file is empty. Else it will print the first record and give a RC=0.
But this seems to be a crude way of doing it. Is there anything else that can be used?
Thanks... |
|
Back to top |
|
 |
Jaya Beginner

Joined: 02 Sep 2005 Posts: 77 Topics: 10 Location: Cincinnati
|
|
Back to top |
|
 |
arunarao Beginner

Joined: 27 Dec 2005 Posts: 4 Topics: 2 Location: India
|
Posted: Wed May 17, 2006 1:30 am Post subject: |
|
|
Oops.. Sorry and thanks Jaya
Cheers,
Aruna |
|
Back to top |
|
 |
|
|