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 a jobs execution priority be modified?
in a jcl, a large volume dataset is loaded to a table using bmcload in step1 and an image copy of the loaded table is taken using bmccopy in step2. Step2 abends because the image copy dataset cannot hold the volume of the table. How can this be rectified?
Explain how can a stopped job be started again?
Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed
Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?
What are the 4 fields in dd statement?
In job processing, what happens in conversion stage?
When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?
Give the syntax of job specifying jcl statement.
what operation is performed by job statement?
what happens in execution stage in job processing?
How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you
How gdg are concatenated?
What is notcat 2 - gs?
How does jcl act on code(if you take a cobol program)?