BNDAVB1 job control statements

Various job control statements are associated with the BNDAVB1 analysis.

The following table shows job control statements for BNDAVB1.
Table 1. Job control statements for BNDAVB1
Statement Use
EXEC The EXEC statement starts the program. It is issued in the following format:
//stepname EXEC PGM=BNDAVB1
where PGM=BNDAVB1 specifies that you want to run the bind avoidance coprocessor program, BNDAVB1.
STEPLIB DD The STEPLIB DD statement defines an existing load library that contains the DB2® Bind Manager programs.

This DD statement is required unless BNDAVB1 was installed in the system link list. The DD statement must reference the load library that contains the DB2 Bind Manager programs.

SYSPRINT DD The SYSPRINT DD statement defines a sequential data set that is used for listing control statements and messages. BNDAVB1 writes a log of control statements and status messages to the SYSPRINT DD statement. This DD statement is required. You can assign SYSPRINT to SYSOUT or to any sequential data set.
OLDDBRM DD The OLDDBRM DD statement defines an existing data set that contains the preexisting DBRM (the DBRM that existed before the compile step was run). This DD statement must reference a sequential data set or a PDS member with attributes RECFM=FB and LRECL=80.
NEWDBRM DD The NEWDBRM DD statement defines an existing data set that contains the new DBRM that was generated by the compile step. This DD statement must reference a PDS member with attributes RECFM=FB and LRECL=80.
OBJECT DD The OBJECT DD statement defines an existing data set that contains the object deck that was generated by the compile step. This DD statement must reference a sequential data set or a PDS member with attributes RECFM=FB and LRECL=80.
SYSUT1 DD The SYSUT1 DD statement defines a temporary work file that is used by BNDAVB1. This DD statement must reference a sequential data set with attributes RECFM=FB and LRECL=80. SYSUT1 must be allocated to a temporary data set and not kept after the BNDAVB1 step runs.

The following example shows DB2 Bind Manager used with an integrated coprocessor. The coprocessor integrates the DB2 precompiler with the language compilers. This example shows a COBOL compilation with the coprocessor and DB2 Bind Manager. The following example shows examples of job control statements for running BNDAVB4 and BNDAVB1.

Figure 1. Coprocessor support sample JCL (Part 1)
//BNDAVB1  JOB (ACCT),' ',CLASS=?,MSGCLASS=? 
//* 
//********************************************************************* 
//*                                                                   * 
//*  Before executing this job:                                       * 
//*                                                                   * 
//*    (1) Substitute a valid job card for the template above         * 
//*                                                                   * 
//*    (2) In the JCL, replace all lower case items with values       * 
//*        that are appropriate for the local environment             * 
//*                                                                   * 
//********************************************************************* 
//***************************  CHANGE LOG  ***************************** 
//********************************************************************* 
//*                                                                   * 
//*  AAMV  20110522  WNFR                                             * 
//*                                                                   * 
//*-------------------------------------------------------------------* 
//*                                                                   * 
//*  BNDAVB1 Bind Avoidance (coprocessor mode)                        * 
//*                                                                   * 
//********************************************************************* 
//* 
//*-------------------------------------------------------------------+ 
//*                                                                   | 
//*                                                                   | 
//* Save a working copy of the old DBRM                               | 
//*                                                                   | 
//*-------------------------------------------------------------------+ 
//* 
//SAVE   EXEC  PGM=IEBGENER 
//SYSPRINT  DD SYSOUT=* 
//SYSIN     DD DUMMY 
//SYSUT1    DD DISP=SHR,DSN=existing.dbrmlib(dbrmname) 
//SYSUT2    DD UNIT=SYSALLDA,SPACE=(CYL,(1,1)), 
//             LRECL=80,RECFM=FB, 
//             DISP=(,PASS),DSN=&&OLDDBRM  
//*  
//*-------------------------------------------------------------------+  
//*                                                                   |  
//*  Execute BNDAVB4 to prepare the program for compilation           |  
//*                                                                   |  
//*-------------------------------------------------------------------+  
//*  
//STEP1  EXEC  PGM=BNDAVB4  
//STEPLIB   DD DISP=SHR,DSN=bnd.loadlib  
//SYSPRINT  DD SYSOUT=*  
//DBRMIN    DD DISP=SHR,DSN=existing.dbrmlib(dbrmname)
//SOURCEIN  DD DISP=SHR,DSN=source.program    
//SOURCEOT  DD UNIT=SYSALLDA,SPACE=(CYL,(1,1)),  
//             LRECL=80,RECFM=FB,  
//             DISP=(,PASS),DSN=&&SRC  
//*  
//*-------------------------------------------------------------------+  
//*                                                                   |  
//* Compile the target program                                        |  
//*                                                                   |  
//*-------------------------------------------------------------------+  
//*  
//COB    EXEC  PGM=IGYCRCTL,  
//             REGION=4M,  
//             PARM=SQL  
//STEPLIB   DD DISP=SHR,DSN=IGYxxx.SIGYCOMP  
//          DD DISP=SHR,DSN=DSNxxx.SDSNEXIT  
Figure 2. Coprocessor support sample JCL (Part 2)
//          DD DISP=SHR,DSN=DSNxxx.SDSNLOAD  
//SYSLIB    DD DUMMY  
//SYSPRINT  DD SYSOUT=*  
//SYSTERM   DD SYSOUT=*  
//SYSUT1    DD UNIT=SYSALLDA,SPACE=(CYL,10)  
//SYSUT2    DD UNIT=SYSALLDA,SPACE=(CYL,10)  
//SYSUT3    DD UNIT=SYSALLDA,SPACE=(CYL,10)  
//SYSUT4    DD UNIT=SYSALLDA,SPACE=(CYL,10)  
//SYSUT5    DD UNIT=SYSALLDA,SPACE=(CYL,10)  
//SYSUT6    DD UNIT=SYSALLDA,SPACE=(CYL,10)  
//SYSUT7    DD UNIT=SYSALLDA,SPACE=(CYL,10) 
//SYSLIN    DD UNIT=SYSALLDA,SPACE=(CYL,(1,1)),  
//             LRECL=80,RECFM=FB,  
//             DISP=(,PASS),DSN=&&OBJECT  
//DBRMLIB   DD DISP=OLD,DSN=dbrmlib.data.set.name(member)  
//SYSIN     DD DISP=(OLD,DELETE),DSN=&&SRC  
//*  
//*-------------------------------------------------------------------+ 
//*                                                                   | 
//* Execute BNDAVB1 to determine whether binding is required          |  
//*                                                                   |  
//*-------------------------------------------------------------------+  
//*  
//BNDAVB EXEC  PGM=BNDAVB1  
//STEPLIB   DD DISP=SHR,DSN=bnd.loadlib  
//SYSPRINT  DD SYSOUT=*  
//OLDDBRM   DD DISP=(OLD,DELETE),DSN=&&OLDDBRM  
//NEWDBRM   DD DISP=OLD,DSN=dbrmlib.data.set.name(member)  
//OBJECT    DD DISP=(OLD,PASS),DSN=&&OBJECT  
//SYSUT1    DD DISP=(NEW,DELETE),UNIT=SYSALLDA,SPACE=(CYL,1),  
//             DSORG=PS,RECFM=FB,LRECL=80  
//*  
//*  
//*-------------------------------------------------------------------+  
//*                                                                   |  
//* Bind the program if necessary                                     |  
//*                                                                   |  
//*-------------------------------------------------------------------+  
//*  
//DB2BIND EXEC PGM=IKJEFT01,COND=(0,EQ,BNDAVB)  
//STEPLIB   DD DISP=SHR,DSN=DSNxxx.SDSNLOAD  
//DBRMLIB   DD DISP=SHR,DSN=dbrmlib.data.set.name(member)  
//SYSTSPRT  DD SYSOUT=*  
//SYSPRINT  DD SYSOUT=*  
//SYSTSIN   DD *    
  Bind commands here  
/*  
//