We had a sysout from a report end up in the wrong database and are attempting to move it to the correct one.
In our batch database, we have the following report:
ID ---> xxxxxxxxxxxx
Job ---> xxxxxxxx Jobid ---> JOB01947
Sel DDname Stepname Procstep DSID Lines Pages
JESMSGLG JES2 2 53 1
JESJCL JES2 3 465 1
JESYSMSG JES2 4 461 1
DDname Stepname Procstep 131 182 13
How do I pull just that piece out and move it to the correct database?
Release : 14.0
Component :
The SARBCH /PRINT function can be used to extract a particular dataset from a sysout group.
The function/JCL, to put the extracted report to a DASD dataset, would be:
//XXXXXXXX JOB ...
//SARBCH EXEC PGM=SARBCH,PARM='VIEW_HLQ' <=== MODIFY DB NAME
//STEPLIB DD DISP=SHR,DSN=VIEW.CVDELOAD <=== MODIFY, IF USED
//SYSPRINT DD SYSOUT=*
//REPORT DD SYSOUT=*
//RPTOUT01 DD DSN=XXXXXX.XXXXXX.RPTOUT01,
// DISP=(,CATLG,DELETE),
// UNIT=XXXX,VOL=SER=YYYYYY,
// SPACE=(CYL,(NNN,NN),RLSE),
// DCB=(LRECL=32756,BLKSIZE=32760,RECFM=VB)
//SYSIN DD *
/PRINT ID=xxx GEN=xxx SEQ=xxx BANNER=* DSLIST=(step,procstep,ddname)
DDNAME=RPTOUT01
/*
//
. Next, the extracted report needs to run through generic JCL to go to the desired View database, matching the SARINIT CLSL/DEST/FORM criteria:
//rptname1 JOB ...
//GENER1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=x
//SYSUT1 DD DISP=SHR,DSN=DSN=XXXXXX.XXXXXX.RPTOUT01
//SYSUT2 DD SYSOUT=(c,,f),DEST=d
//SYSIN DD DUMMY
//
where: rptname1 is the desired name of the report
c, f, and d match the class, form, and destination (respectively)
. If you then want to have the proper date on the report, then you would use the
SARBCH /CHANGE function:
//XXXXXXXX JOB ...
//SARBCH EXEC PGM=SARBCH,PARM='VIEW_HLQ' <=== MODIFY DB NAME
//STEPLIB DD DISP=SHR,DSN=VIEW.CVDELOAD <=== MODIFY, IF USED
//SYSPRINT DD SYSOUT=*
//REPORT DD SYSOUT=*
//SYSIN DD *
/CHANGE ID=xxx GEN=xxx SEQ=xxx ARCHDATE=mm/dd/yyyy ARCHTIME=hh:mm:ss
/*
//