Is there a way to check for an empty file in JCL other than
using IEBCOMPR and the command PRINT COUNT(1)?
Answer Posted / arul anand.a
//STEP01 EXEC PGM=IDCAMS
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//INDD DD DSN=FILE1,
// DISP=SHR
//OUTDD DD DSN=FILE2,
// DISP=SHR,
REPRO INFILE(INDD) OUTFILE(OUTDD) COUNT(1)
THIS WILL GIVE RC = 04 IF THE INFILE IS EMPTY.
OTHERWISE IT WILL GIVE 0.
| Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
Explain how can the disposition of sysout datasets be set for an entire jobstream?
What is jcl in mainframe?
how do you code a null statement?
what EXEC statement is and what is the syntax of EXEC statement used in JCL?
What statement can be used to send data to another mvs jes3 node?
what is the resolution for sb37 error
What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?
Can I send output of job to my remote device careerride123?
What are the utility programs in jcl?
What is the function of dd name parameter with a 2 part structure; audit.report?
Explain about ISPF/TSO Commands
Differentiate between the joblib and the steplib statements?
What is the function of //cntl statement?
How can the attributes of one sms dataset be copied to another dataset?
if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?