In CA Earl, how do you force SYSEARL output to be opened and written to when no report is produced?
When the SYSEARL data set is defined in the CA Earl execution JCL, the CA Earl report output is directed to the SYSEARL data set instead of to the SYSPRINT data set. However, if the CA Earl request results in zero records, no report is produced. When there is no report, the SYSEARL data set is not opened. This can cause problems for subsequent jobs or job steps that expect the SYSEARL data set to exist. How can you cause the SYSEARL data set to be opened and written to even though no report is produced?
Sample:
There is no option within CA Earl to force an open or write to SYSEARL when the request produces no records.
However, you can handle this in a JCL procedure application solution.
Two suggestions for the MVS environment follow:
//INIT EXEC PGM=IEBGENERThen, in the CA Earl step, point SYSEARL DD to the same data set:
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD DSN=sysearl.dataset,DISP=(NEW,CATLG,DELETE),...etc...
//SYSUT1 DD *...some initialized record ...
/*
//EARL EXEC PGM=EARLWhen there is no report produced, SYSEARL will not be opened and will contain the initialized record that you primed in the first step.
//STEPLIB DD DISP=SHR,DSN=your.earl.cailib
//SYSPRINT DD SYSOUT=*
//SYSEARL DD DSN=sysearl.dataset,DISP=SHR...
//SYSIN DD *...your Earl request that produces 0 records in the report ...
/*
//EARL EXEC PGM=EARLUsing this second example, step ANY will get RC 12 and NEXTSTEP will flush if the SYSEARL data set was not opened and therefore does not exist.
//STEPLIB DD DISP=SHR,DSN=your.earl.cailib
//SYSPRINT DD SYSOUT=*
//SYSEARL DD DSN=sysearl.dataset,DISP=(NEW,CATLG,DELETE),...etc......
//SYSIN DD *...your Earl request ...
/*
//ANY EXEC PGM=IEBGENER,COND=EVEN
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=sysearl.dataset,DISP=SHR
//SYSUT2 DD DUMMY
//*
//NEXTSTEP EXEC PGM=next,COND=(0,NE,ANY)...