CA Batch Processor for Db2 for Z/OS : Batch Processor statements included instream in the JCL directly

book

Article ID: 225704

calendar_today

Updated On:

Products

CA Database Management for DB2 for z/OS - Administration Suite

Issue/Introduction

Can CA Batch Processor statements be included in the the JCL directly, instead of using a dataset for input?
Example:
The input is

//BPIIPT   DD DISP=SHR,DSN=dataset(member),shr

Can the statements within this dataset be copied directly into the JCL?

Environment

DB2 for Z/OS

Resolution

Yes.  The input can be made 'in-stream'.   

The standard batch processor script looks like this referencing the batch processor statements in the BPIIPT  DD statement from a dataset(member).

//BPIIPT   DD DISP=SHR,
//        DSN=hlq.BPCODE(ADDCOL1) <<<< the dataset contains SQL for batch processor to execute in Db2.
//BPIOPT   DD   *
.CONTROL BPID(hlq.BPCODE-ADDCOL1) +
 LOGID(DP11) UNIT(SYSDA)
.LIST SYSOUT(X,,A)
.OPTION   ERRORS NOSQLERRORS RETRY(10) NOBINDERRORS
.CONNECT ssid

To make this in-steam, move the BPIOPT DD and it's control statements ahead of BPIIPT.

The BPIIPT DD should be the last DD in the JCL.

Change BPIIPT to //DD BPIIPT *

just an asterisk indicating instream parms... then copy all Batch Processor syntax directly after //DD BPIIPT *

Example:

//BPIOPT   DD   *
.CONTROL BPID(hlq.BPCODE-ADDCOL1) +
 LOGID(ssid) UNIT(SYSDA)
.LIST SYSOUT(X,,A)
.OPTION   ERRORS NOSQLERRORS RETRY(10) NOBINDERRORS
.CONNECT ssid
//BPIIPT   DD  *
ALTER   TABLE authid.TBCORPT
        ADD TIMESMOD1 TIMESTAMP
                                    NOT NULL WITH DEFAULT
            ;

Additional Information

JCL Requirements