How do you handle empty files in a JCL ?
Answers were Sorted based on User's Feedback
Answer / guest
Yes, we can handle empty file in JCL, there is utility
provided by IBM "UT939" ,eg //STEP1 EXEC PGM=UT939,
IF step1 return code is 4 then there is empty file and else
if return code is 0 (for non-empty file). We can handle
this with COND parameters whether to execute next step or
not if file is empty.
SUPPOSE WE DON'T WANT TO EXECUTE THEN
eg //STEP2 EXEC PGM=XXX,
COND=(4,EQ,STEP1)
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / bharani
Read first record of the file using IDCAMS, It will return
the cc=0 if the file is not empty, otherwise it returns
CC=4.
| Is This Answer Correct ? | 5 Yes | 3 No |
How to delete AIX ? i) IEBGENER ii) IDCAMS iii) PURGE iv) All of the above
how can we pass parameters from JCL to cobol subprogram...my requirement is i should not get data from mainprogram but i need it from JCL directly
How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?
How to print data of sequential file to Spool..?
How to get the last but one duplicate record of the file using Sort?
What parameter directs the output of the job log dataset?
What is the use of DSNDB07 ?
How to find the UNIT and VOLUME of a (a) KEPT (b) UNCATALOGED and (c) CATALOGED dataset - using (i) JCL and using (ii) ISPF ?
how can the same proc be re-used and called by many jobs?
how to put a dependency on job in jcl using opc scheduler?
if time parameter is not coded on the job card and job step then what is the default time assigned to the entire job and for each step in the job by the systyem ?
GDG Create syntax ?