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
What is NOTCAT ?
What is jcl in mainframe?
how to run batch program without jcl?
what are the statements that are not valid to be included in an include statement?
if the submitter of a job wants to inform another user about the job completion, how can it be done?
how would you create a temporary dataset? And where will you use them?
why should SYSIN DD * statement should not be included inside a PROCedure snippet??? please answer this.. i need to know.
write a jcl to execute a job by 7:00 am on jan 20,1986?
What is timing concept in mainframe?
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 syntax of JCL statement?
Explain about ISPF/TSO Commands
What are some jcl statements that are not allowed in procedures?
In sms datasets, what is the function of the dd avgrec keyword?
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?