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
Name a few IBM utility programs, and explain its function.
Explain in DD statement what is the use of DCB parameter?
What is the difference between the positional and keyword parameters? Give examples.
what EXEC statement is and what is the syntax of EXEC statement used in JCL?
What are the 2 types of parameters in dd statement?
How can the submitting users racf authority be overridden in a job stream?
Name what parameter directs the output of the job log dataset?
What does it mean by Restart and Checkpoint in JCL ? How are checkpoints being taken and what is their usage ? How to use Checkpoint macro on a JOBSTEP ?
Is condition checking possible in jcl?
List in order the hierarchical levels of jcl?
how you can direct the data to spool using SYSOUT option?
I need exexution process for JCL programs
For what purpose steplib and joblib are used ?
what are the statements that are not valid to be included in an include statement?
What is the use of symbol // in jcl?