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?
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
;