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 |
the command to open a dataset directly from the JCL instead of opening it separately using 3.4 option.
Suppose there r total 10 steps. Out of which i want to execute only the 7th step. How can i do that....????
When we give TYPERUN = SCAN , what are the syntax errors we get?
Can you code instream data in a PROC ?
what is the purpose of coding class parameter in job statement?
Is it possible to take a PDS and write it to a GDG? If so, can you provide an example? Thanx
Given a input file with duplicates how to remove the duplicate records from the file using JCL?
6 Answers CDS, Convergys, TCS,
can we modify the code in copy book? if it possible how to submit ofter the modification.
A maximum of 100 chars can be passed to Cobol through Parm in JCL, If we want to pass more than 100 Chars how we can do it ?
How can return codes be tested before execution of a job step?
How to pass values in jcl to cobol?
How to read records in reverse order in flat file?