Batch Processor statements included instream in the JCL directly
search cancel

Batch Processor statements included instream in the JCL directly

book

Article ID: 225704

calendar_today

Updated On:

Products

Batch Processor Database Management for DB2 for z/OS - Administration Suite Database Management for DB2 for z/OS - Performance Suite Database Management for DB2 for z/OS - Recovery Suite Database Management for DB2 for z/OS - SQL Performance Suite Database Management for DB2 for z/OS - Utilities Suite DATABASE MANAGEMENT SOLUTIONS FOR DB2 FOR Z/OS

Issue/Introduction

Can Batch Processor for Db2 for z/OS (RBP) statements be included in the the JCL directly, instead of using a dataset for input?

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

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

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(xxxxxxx) <<<< the dataset contains SQL for batch processor to execute in Db2.
//BPIOPT   DD   *
.CONTROL BPID(hlq.BPCODE-xxxxxxx) +
LOGID(ssid) 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-xxxxxxx) +
 LOGID(ssid) UNIT(SYSDA)
.LIST SYSOUT(X,,A)
.OPTION   ERRORS NOSQLERRORS RETRY(10) NOBINDERRORS
.CONNECT ssid
//BPIIPT   DD  *
ALTER   TABLE authid.tbname
      ADD col1 TIMESTAMP
                                    NOT NULL WITH DEFAULT
            ;

Additional Information

JCL Requirements