How to generate a report from SYSVIEW screens using a batch job, including how to change the screen format for the command.
Release : 16.0 - but applicable to ALL RELEASES
Component: SYSVIEW
In the sample below JOBSUM display is used to list all the jobs submitted by user userid and output stored in the sequential dataset USERID.JOBSUM.REPORT that was pre-allocated prior to JCL submission. The highlighted part is what needs to be modified based on environment settings and needs.
//YOURJOBCARD
//JOBLIB DD DISP=SHR,DSN=PROD.SVW.R160.CNM4BLOD
//STEP EXEC PGM=GSVXBAT,
// PARM='SSID=GSVX,LINECNT=66,SHOWINP=YES,MENUOFF' /* Make sure that correct SSID in use, GSVX is default one */
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD DISP=SHR,DSN=USERID.JOBSUM.REPORT /* This dataset need to be pre allocated */
//GSVCLOG DD SYSOUT=*
//SYSIN DD *
COMMAND=(PRINT OPEN)
COMMAND=(JOBSUM) /* Replace with SYSVIEW display command, for example: ACT, CTRANLOG etc. */
COMMAND=(SET FORMAT format_name) /* format_name must preexist for that screen in order to use this */
COMMAND=(SEL JOBNAME EQ USERID*)
COMMAND=(SCROLL)
COMMAND=(PRINT CLOSE)
SCROLL
COMMAND=END
/*