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 ? | 5 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 |
what is the purpose of SYSOUT parameter in the DD statement?
I have a File that has duplicate records. I need only those records that occur more than thrice.
What is the differentiation between TRK,cyl, and Bytes... how they can be connected??
Explain the function of dd disp parameter?
how GDGs are concatinated?
How to use COND Parameter in jcl
When concatenating two PDS can any one PDS can have empty dataset i.e without any value(Dummy).
which utility is used a dummy utility?
shall we concordinate two different length dataset in to a new date set.
HOW TO CONVERT VARIABLE BLOCK TO FIXED BLOCK ?
Name the parameters which can be used to limit the number of records written to a sysout dataset?
How can an in-stream dataset be terminated?