JCL Requirements

The following sample JCL stream is provided for executing the Batch Processor:
dm18
The following sample JCL stream is provided for executing the Batch Processor:
//STEP1 EXEC PGM=PTLDRIVM,REGION=4M,PARM='EP=BPLBCTL' //STEPLIB DD DISP=SHR,DSN=hlq.CDBALOAD // DD DISP=SHR,DSN=hlq.DSNLOAD //PTILIB DD DISP=SHR,DSN=hlq.CDBALOAD // DD DISP=SHR,DSN=hlq.DSNLOAD //PTIPARM DD DISP=SHR,DSN=hlq.CDBAPARM //USERLIB DD DISP=SHR,DSN=SYS1.USERLOAD //SYSOUT DD SYSOUT=* //UTPRINT DD SYSOUT=* //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) //SYSREC DD UNTI=SYSDA,SPACE=(TRK,(1,1)) //BPIIPT DD DISP=SHR,DSN=PTIPH.STRATGY1.SQL //BPIOPT DD * .OPTION AUDIT(LONG)
A description of the JCL and information about dynamically allocated DD statements follows:
  • STEP1
    Specifies the batch program name as PTLDRIVM (CA driver) and the parameter is BPLBCTL (the entry point for the Batch Processor):
    • PTLDRIVM requires all invoked programs to be from an APF-authorized library; otherwise, an abend occurs.
    • There are two optional parameters (HOST and HGHLVL) that can be passed to BPLBCTL as follows:
      //STEP1 EXEC PGM=PTLDRIVM,REGION=4M, PARM='EP=BPLBCTL/HOST=xxxxxxxx,HGHLVL=yyyyyyyy'
      These parameters provide the values for the %HOST and %HGHLVL variables used in the DATASET parameter of the .ALLOC command. These variables each have a maximum length of eight (8) characters. Additionally, if HGHLVL is specified on the EXEC statement, any .CALL UTIL that enables dynamic allocation of the OUTDDN has a permanent data set allocated for SYSPRINT, with a data set name as follows:
      '%hghlvl..D%date..T%time..SYSPRINT'
  • STEPLIB and PTILIB
    Provides information from the profile option of your product. If your job is running DB2 utilities, you must also specify the DB2 load library for the utilities in the STEPLIB DD statement. In the example JCL stream, the DB2 load library is hlq.DSNLOAD.
  • PTIPARM
    Lists the parameter library that contains the default settings used by our products. The defaults were specified during installation.
  • USERLIB
    Contains the load library for calling user application programs. Whenever an application program is called, the USERLIB DD statement is searched for the program. All necessary application load libraries should be allocated to this DD statement.
  • UTPRINT
    Provides SYSOUT class information from the profile of your CA product. The UTPRINT DD statement is used by some DB2 utilities for SORT messages.
  • SYSREC
    Allocates space for some DB2 utilities, such as REORG. If the utility you are calling requires a SYSREC DD statement, allocate the data set with the ALLOC command before calling the utility.
    Because you allocate the SYSREC data set, different SYSREC data sets can be allocated during one Batch Processor execution based on the needs of the utility being executed.
  • BPIIPT
    Defines the input data set for the Batch Processor. The BPIIPT DD statement is read and executed 
    after
     
     
    the BPIOPT DD statement.
  • BPIOPT
    Permits the Batch Processor control statements to be dynamically appended to the front of the input data set specified on the BPIIPT DD statement. The BPIOPT DD statement is where you place any commands, such as CONTROL or OPTION, to specify how the Batch Processor is executed. When the JCL is processed, the BPIOPT DD statement is read and executed
     first
    , then the BPIIPT DD statement.
    You only need a SYSUDUMP DD statement to indicate you want a dump if the execution abnormally terminates. The SYSOUT class is obtained from the profile option in your product.
The JCL does not require the SYSIN and SYSPRINT DD statements necessary to execute DB2 utilities or the SYSTSIN and SYSTSPRT DD statements to execute DSN commands.
If your JCL already contains any of these DD statements, an allocation error occurs when the Batch Processor attempts to allocate them. Be sure these DD statements are not in your JCL when you submit the job to the Batch Processor, so the Batch Processor can allocate them automatically.
The following describes how the Batch Processor handles these DD statements:
  • SYSIN
    The SYSIN DD statement is dynamically allocated by the Batch Processor and is used to pass the input statements between the DATA and ENDDATA commands to the called DB2 utility.
  • SYSPRINT
    The SYSPRINT DD statement is dynamically allocated by the Batch Processor and is used to capture the output from the DB2 utilities. The messages sent to SYSPRINT are re-routed to the audit trail. If the messages are greater than 80 characters, they are wrapped.
  • SYSTSIN
    The SYSTSIN DD statement is dynamically allocated by the Batch Processor and is used to pass the input statements between the DATA and ENDDATA commands to the DSN Command Processor.
  • SYSTSPRT
    The SYSTSPRT DD statement is dynamically allocated by the Batch Processor and is used to capture the output from the DSN Command Processor. The messages sent to SYSTSPRT are re-routed to the audit trail. If the messages are greater than 80 characters, they are wrapped.