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
What is the function of a dd statement?
How do you create a temporary dataset?
What are some jcl statements that are not allowed in procedures?
How is a type of file defined in the jcl that executes the cobol program?
What is the function of //jcllib statement?
Explain the function of a dd statement?
what is the resolution for sb37 error
What parameters can be used to limit the number of records written to a sysout dataset?
Suppose I have five jobs to do. But I want to hold one?
How to resolve the error "WER488A JOIN CAPACITY EXCEEDED" I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem? I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem?
What is the difference between the positional and keyword parameters? Give examples.
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) ?
hello friends ,i have exam in Hsbc,pls any on send me placement papers and technical questions on mainframes,thank u
How to execute 2nd and 4th steps among 5 steps in jcl proc?
how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?