JRH DB2I2 Reusability

The JRH DB2I2 reusability feature allows you to process multiple JRH DB2I2 commands in sequence in batch mode to allow you to use the output from one JRH DB2I2 command as the input to the next JRH DB2I2 command.

The following example demonstrate how to use LISTC and DSADJ JRH DB2I2 commands to adjust the space allocation if any of the tablespace selected for database DDB have more than 5 extents on their base VSAM dataset.

 
        //LINEOBJ DD *
        TS DDB.%
        //DB2I2CMD DD *
        LISTC EXT(5) T=N TSIX ODSN=T1          (1)
        DSADJ %=100 IDSN=T1 ODSN=T2            (2)
        /*
 
 
(1)     Use the LISTC command to list all DB2 dataset VSAM catalog information
        EXT(5) option return only for those dataset has more than 5 extents
        T=N option disable the heading and footing printing
        The output of LISCT is usually a DS format, Use TSIX option to return
          the output in TS or IX line object format
        ODSN=T1 direct the output the dataset yourTSOID.T1
 
(2)     Use the output from previous command T1 as the input to the DSADJ command
        DSADJ command with %=100 option to generate DB2 ALTER TABLESPACE statements
          for the TS line objects which output from the previous LISTC command. The primary
          allocation is adjusted based on the current HI-ALLOC-RBA.
        Option ODSN=T2 direct the output of the DSADJ command to yourTSOID.T2
 
 

(C)opyrighted 1997, 2008 By JRH Golden State Software Inc.