How do you handle empty files in a JCL ?

Answers were Sorted based on User's Feedback



How do you handle empty files in a JCL ? ..

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

How do you handle empty files in a JCL ? ..

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

How do you handle empty files in a JCL ? ..

Answer / guest

by using dummy

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More JCL Interview Questions

What does a disposition of (new,catlg,keep) for a dsn mean?

0 Answers  


read all error codes like SB07?

1 Answers  


What is catelog procedure and how many catelog procedure to use in one job?

2 Answers   Infosys,


I have an job having three job steps.Suppose i want to call a pgm in step2 and aproc in step3.How to write the code?

2 Answers   IBM,


what is a steplib

4 Answers   CGI,






1) Is CLASS used for assigning Priority (as we say a job having class '6' will run before the job having class '5'? then what is the difference between CLASS and PRTY ? 2) In a same JCL, 2 JOB statements with different Classes and NO PRTY are submitted ? which will run first ? & with different classes and different PRTY also, which will run first now ?

3 Answers   IBM,


What is the DD statement for a output file?

3 Answers  


How is a dataset passed from one step to another?

2 Answers   DELL,


how can u understand ps and pds from their names ?

1 Answers   TCS,


Is their any set of rules for dd? Explain.

0 Answers  


If a field is declared as a comp-3 field and if we want to sort a dataset based on this field, then how will the sort card be??? e.g- if we want to sort by a field which is defined as a PIC X(5) then we will mention - sort fields=(1,5,ch,a). Likewise if a field is defined as PIC S9(10)COMP-3 then in this case how will the sort field be defined (because in this case a sign is also involved)???

8 Answers  


How to pass the temp dataset form one JOB step to another?

6 Answers   IBM,


Categories