How to easily create control cards for SARBCH?

Document ID : KB000056914
Last Modified Date : 14/02/2018
Show Technical Document Details

The SARSAM8 (Adlist) utility can create these control cards using the /List and CCREATE options.

The CVDEJCL library has the member BRMJSAMX which is an SMP/E version and the member BRMSSAMX which is a non-SMP/E version to assemble and link the utility into the loadlib.

 

For the /LIST option, you can specify:

1.  A specific archive date

2.  An archive date range

3.  All archive dates (use an  “*” )

4.  Today’s date

5.  Start Date/End Date combination

The /LIST option will create a nice report listing all the sysouts or   reports for which controls were created.

Next we can limit the reports processed by using the ReportId parameter to indicate a specific report id or a wildcard report id. 

Finally, the CCREATE option will create the type of control card that you specify.   Additional information can be added to the request and will be added to the control card when it is created.

 

For example:

      CCREATE(PRINT BANNER=* DDNAME=SPEC)

      This request will create a /PRINT card with Banner=* and the

      DDNAME=SPEC included in the control card.

 

 

Here is the report created by the /List option.

 

          Control Card: /LIST ARCHDATE=09/05/14-02/13/15            

                                           REPORTID=TEST*                        

                                          CCREATE(PRINT BANNER=* DDNAME=SPEC)   

                                                                              

Sysout Id                       Gen   Seq  Arc Date/Time      Prt Date/Time      Loc

=================================================

TEST-REPORT                  21     2     02/13/15 10:05                                TAPE

TEST-REPORT                  21     1     02/13/15 09:50                                TAPE

TEST-REPORT                  14     2     09/05/14 12:24  11/14/14 16:38    TAPE

TEST-REPORT                  14     1     09/05/14 12:21                                TAPE

 

 

Here are the control cards constructed by the utility.  The Banner and DDNAME information specified has been included.

 

/PRINT BANNER=* DDNAME=SPEC                                                    

 ID='TEST-REPORT'                                                             

 GEN=00021 SEQ=00002                                                          

/PRINT BANNER=* DDNAME=SPEC                                                   

 ID='TEST-REPORT'                                                             

 GEN=00021 SEQ=00001                                                          

/PRINT BANNER=* DDNAME=SPEC                                                   

 ID='TEST-REPORT'                                                             

 GEN=00014 SEQ=00002                                                          

/PRINT BANNER=* DDNAME=SPEC                                                   

 ID='TEST-REPORT'                                                              

 GEN=00014 SEQ=00001                                                          

 

 

The JCL for this utility is shown below:

 

//STEP1        EXEC PGM=ADLIST,PARM='  db  NAME'  <= Modify database name

//STEPLIB    DD DSN=CAI.CVDELOAD,DISP=SHR         <= Modify to your loadlib

//SYSPRINT DD SYSOUT=*

//CTLCARD  DD DSN=...........     = Define a dataset where the control cards will go.

//SYSIN        DD *

/LIST ARCHDATE=09/05/14-02/13/15                       <= Modify

REPORTID=xxxxxxxx

CCREATE(LOAD)

/*

 

  

Take the dataset created by the CTLCARD DD and use it as input to a SARBCH job.

 

//STEP1        EXEC PGM=SARBCH,PARM='VIEW.SYSTEM1'     <= MODIFY             

//STEPLIB    DD DISP=SHR,DSN=CAI.VIEW.CVDELOAD         <= MODIFY

//SYSPRINT DD SYSOUT=*                                            

//REPORT     DD SYSOUT=*                                            

//SYSIN        DD DISP=SHR,DSN=……… name of the CTLCARD dataset                                                

/DELETE USER=STICH01                                              

/*                                                                

//