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
Can an individual step be restricted from using all the jobs allowed cpu time?
Explain the function of the steplib dd statement?
How can an in-stream dataset be terminated?
Can I share my data with other jobs? How?
What is the purpose of dd * statement in jcl?
How dummy is used in jcl?
How can the disposition of sysout datasets be set for an entire jobstream?
what sort card you will use to copy the data from one dataset to another dataset?
In sms datasets, what is the function of the dd mgmtclas keyword?
which utility is used to sort a file in jcl?
Can we call instream to catalog and catalog to instream?
what are JCLLIB and STEPLIB in JCL?
What are the parameters that are used in creating a gdg?
What are the 4 fields in dd statement?
What parameter directs the output of the job log dataset?