ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

View - For SARBCH, would like to create separate entries for each SEQ number for a particular ID=... and GEN=...

book

Article ID: 241431

calendar_today

Updated On:

Products

View

Issue/Introduction

I would like a way to SARBCH /PRINT all output from a ID=... GEN...

CA View ALL --------------- Sysout Selection List --------------------------
Command ===>                                                                
                                                                            
Sel  Sysout ID                           Jobname     Jobid          Gen   Seq   Pages 
==>  ABCDEFG1                       *                  *                 *           *         *       
     ABCDEFG1                         ABCDEFG1 STC28762  3525     5       3 
     ABCDEFG1                         ABCDEFG1 STC28762  3525     4       1 
     ABCDEFG1                         ABCDEFG1 STC28762  3525     3       1 
     ABCDEFG1                         ABCDEFG1 STC28762  3525     2       1 
     ABCDEFG1                         ABCDEFG1 STC28762  3525     1       2 

/PRINT DDNAME=SARPRINT ID=ABCDEFG1 GEN=3525 prints only the most recent occurrence.

As the documentation does not procide any way to achieve what I would like, is there a way I can achieve this? 

 

Environment

Release : 14.0

Component :

Resolution

The non-LIST functions of SARBCH (/PRINT, /xPRINT, /DELETE, etc.) deal with one report at a time (ID, GEN, and SEQ needing specified). 

With use of /PRINT, when no SEQ=nnnnn is specified, you will receive the most recent collected report meeting ID and GEN, and not all the occurrences. 

As the multiple-SEQ function does not exist in SARBCH code, it is extremely unlikely that there will be a future means to do that as well. 

To generate /PRINT entries for all sequence numbers (of a certain ID=... and GEN=...), use the following:

 . Run the following SARGRW program:

//XXXXXXXX JOB ...
//SARGRW01 EXEC PGM=SARGRW                                
//STEPLIB  DD   DISP=SHR,DSN=VIEW.CVDELOAD   <=== Modify, if used
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(5),,CONTIG)          
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(5),,CONTIG)          
//SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,(5),,CONTIG)          
//SYSUDUMP DD SYSOUT=*                                    
//SYSOUT   DD SYSOUT=*                                    
//SYSPRINT DD SYSOUT=*                                    
//PRTFILE  DD SYSOUT=*                                    
//OUTFILE  DD  DISP=(,CATLG,DELETE),                      
//             DSN=xxxxxx.xxxxxx.SARGRWOP,             
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000),      
//             SPACE=(TRK,(5,1),RLSE),                    
//             UNIT=xxxx,VOL=SER=vvvvvv
//SYSIN    DD *                                           
/CONTROL SEQ=RID DATABASE=view_hlq        <=== Modify DB name
/IF (ID='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') AND (GEN=nnnnn)                 
/ OUTPUT '/PRINT ID='   COL(1)                           
/ OUTPUT ID            COL(11)                            
/ OUTPUT ' GEN='       COL(43)                            
/ OUTPUT EDIT(GEN,'99999') COL(48)
/ OUTPUT ' SEQ='       COL(53)    
/ OUTPUT EDIT(SEQ,'99999') COL(58)
/END                              
/*                                
// 

Note: In the above, fill in the "ID='...'" with a Sysout ID, and the generation number, as needed. 

The resulting output file will contain SARBCH /PRINT transactions, for each SEQ number.