How do you handle empty files in a JCL ?
Answer Posted / 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 |
Post New Answer View All Answers
What methodology can be adapted to transfer data to a program that is coded using the exec statement?
How can the disposition of sysout datasets be set for an entire jobstream?
I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.
Explain the function of //jcllib statement?
Can we call instream to catalog and catalog to instream?
when does a dataset go uncataloged?
Explain how can an in-stream dataset be terminated?
how JCL works?
Is condition checking possible in jcl?
Name the parameters which can be used to limit the number of records written to a sysout dataset?
what is JCL?
How can an in-stream dataset be terminated?
What is the function of //jcllib statement?
I have a job called careerride and some steps in it as step1,step2. But I want to execute step2 before step1 ? How do I do that?
how can the same proc be re-used and called by many jobs?