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 |
I have four steps in jcl they are STEP1,STEP2,STEP3 and STEP4. Can it possible to run the reverse order like step4 first then step3,step2,step1?
What will happen if you attempt to restart a job in the middle of a JCL // IF .... // ENDIF?
can u explain gdg with example wht happens if we give limit,empty,noempty,scartch and no scartch
Say I have a file with 12 records. Each record has the name of the month. I have to append data in these 12 records into 1 record. How is it possible?
wht is sysudump n sysout,sysprint ?
State the uses of syspring, sysin, sort fields, sum fields and dummy.
List the various advantages of using jcl language?
What is 'S0C7' abend?
What is default if we don't specify RD parameter at all ?
How can we see data in TEMPARARY DATA SET in JCL ?
How can you execute a COBOL program via SYSIN in JCL?
hi iam learning mainframes,can anybody tell me how to check JCL errors.(after submiting the JCL we have check in spool or is there any other method)