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 |
If your job fails at particular step then what would be the return code for next steps
How to execute 300 steps in a Job?
How to delete generations of gdg without deleting gdg base?
What is STEPLIB, JOBLIB? What is it used for?
If we have 100 job steps in JCL and we want to excute steps only starting from 43 to 50, then how it can be coded in JCL/
Explain how can the disposition of sysout datasets be set for an entire jobstream?
How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.
What are the basic JCL Statements for a Job?
how to override PROC? please give answer in details. Please mention how to write it in JCL. Thanks in advance.
Is automatic restart possible in jcl?
What is the difference between a symbolic and an override in executing a PROC?
Can we able insert data into a PS file Using IEBUPDTE utility??? If Yes can anyone describe it please..