There are two steps in a JCl, the first one generates a
report while the second step send an email saying the
report has been generated, but the second steps should only
be executed when the report file is non-empty. How can it
be acheived. We may include steps in between.
Answer Posted / abhijit18in2002
Insert a IDCAMS step between the two step here is the Eg
//STEP01 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUT1 DD DSN=MY.SORT.FILE1,DISP=SHR
//SYSUT2 DD DSN=MY.SORT.FILE2,DISP=SHR
//SYSIN DD DUMMY
//*
//* Checking the File for any data
//*
//CHEKEMTY EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//MYFILE DD DSN=MY.SORT.FILE2,DISP=SHR
//SYSIN DD *
PRINT INFILE(MYFILE) CHARACTER COUNT(1)
//*
//* If above step gives RC=04 it means file1 is empty
//* so STEP02 would only execute if step CHEKEMTY has
//* RC Not equal to 04.
//STEP02 EXEC PGM=SASSTRLR,
// PARM='INACT',COND=(04,EQ,CHEKEMTY)
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
DEMAND ABCXYZ
//*
| Is This Answer Correct ? | 25 Yes | 0 No |
Post New Answer View All Answers
how you can access an uncataloged dataset in a JCL?
Explain how can the disposition of sysout datasets be set for an entire jobstream?
is there any way to execute more than one proc in the same exec statement at the same time..?
Explain the job statement in jcl?
how would you create a temporary dataset? And where will you use them?
What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?
How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length ----TRY
what is the compile process of cobol program expalin with code
Explain about LMFREE�free data set from its association with data ID
what is JCL?
List the various advantages of using jcl language?
Explain the function of dd disp parameter?
How to alter the parameters for the existing gdg?
What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?
How does jcl specify the job to the operating system?