Query on How to Output a List of Sysouts for certain period using SARBCH
search cancel

Query on How to Output a List of Sysouts for certain period using SARBCH

book

Article ID: 267652

calendar_today

Updated On:

Products

OM View

Issue/Introduction

Want to output the list of sysouts from CA View to a dataset, given a particular ID pattern (say ID=ISM*) and limit the list to just capture only those generated within a particular period (say, from 01/01/2023 to 06/08/023), what could be the right parm options to use or include with the LIST command to have the specific date-period condition?

Tried to add DATE (or ARCHDATE) to the LIST command, but receive message “Invalid keyword name DATE or ARCHDATE”.

/LIST ID=ISM* DATE=01/01/2023:06/08/2023
/LIST ID=ISM* ARCHDATE=01/01/2023:06/08/2023

It seems both DATE and ARCHDATE can’t be used with the LIST command.

Is there any other way to apply the date-condition and output the result to a dataset? 

Environment

Release : 14.0

Resolution

SARBCH operand  /LIST wont allow for an Arch date to be specified as part of the input

However you can you SARGRW to generate the /LIST statements for you based on the Archive dates you want to select

Here is an example SARGRW 

//STEP1  EXEC PGM=SARGRW                                             
//STEPLIB  DD DISP=SHR,DSN= CA VIEW LOADLIB                  
//SYSPRINT DD SYSOUT=*                                               
//SYSOUT   DD SYSOUT=*                                               
//OUTFILE  DD  DISP=(,CATLG,DELETE),                                 
//             DSN= DATESET.CARDS,           <<<===== YOUR DSN  
//             DCB=(RECFM=FB,LRECL=132,BLKSIZE=0),                   
//             SPACE=(TRK,(5,1),RLSE)                                
//PRTFILE  DD SYSOUT=*                                               
//*                                                                  
//* SAMPLE SARGRW CONTROL STATEMENTS TO GENERATE A FILE CONTAINING   
//* "/LIST ID=SYSOUTID" CONTROL STATEMENTS FOR NAMED SYSOUT         
//*                                                                  
//SYSIN    DD *                                                      
/CONTROL SEQ=RID DATABASE= YOUR VIEW DB HLQ                             
/SELECT SUBSTR(ID,1,3)='nnn'                                            
/IF (ARCHDATE GE '16/01/2023') AND (ARCHDATE LE '19/02/2023')        
/ OUTPUT '/LIST ID='      COL(1)                                     
/ OUTPUT ID         COL(10)                                          
/ OUTPUT 'GEN='     COL(50)                                          
/ OUTPUT EDIT(GEN,'99999') 
/ END                                                                

What the job does is select reports starting with nnn that were Archived between ARCHDATE GE '16/01/2023') AND (ARCHDATE LE '19/02/2023' and builds a /LIST command in the Output file.

The /LIST commands can then be input into SARBCH to generate the information you require