Supposed a program creates a report. Now I want the report to be created in SDSF spool using a temporary output class let's say T. then I want to check the existence of the report in spool. if the report has only a header and detail, delete the report else change the sysout class to R to be swept in infopac. Is it possible to do via JCL only? I can suppress it via program but I'm thinking to handle it via JCL? any thoughts on how to do it?
current JCL structure- the current code allows the report to be sweep in INFOPAC
//STEP1 EXEC DBABAT3,
// PROG=MYPGM
//RPTFILE DD UNIT=SYSDA,SPACE=(CYL,(2,1))
//SYSIN DD DDNAME=PC
//PC DD DSN=MY.CNTLLIB(RPTCTC),DISP=SHR
the content of RPTCTC
PC1SYSOUT=(R,MYPGMA,STD1)
PC2SYSOUT=(R,MYPGMB,STD1)