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
Is it possible to left uncode disp?
Explain the purpose of dd * statement in jcl?
What is the purpose of dd?
The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?
I want my job (careerride) to be executed in 1 minute and 2 seconds. How do I do that?
how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?
We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?
what is the resolution for sb37 error
what is a jcl?
What is jcl in mainframe, and how many types of jcl statements are there for a job?
what is DD statement is used in JCL?
What is the use of disp parameter?
if the submitter of a job wants to inform another user about the job completion, how can it be done?
How jcl is used for testing batch programs?
Define concatenating?