IBM Support

Bind Manager Coprocessor Support (Bind Avoidance)

Question & Answer


Question

Bind Manager Coprocessor Support (Bind Avoidance)

Answer

BNDAVB1 compares the old ("before") DBRM that existed before the compile to the new ("after") DBRM that is produced by the compile to determine whether the SQL has changed. If not, it modifies the object code to allow the program to execute without a bind. The only difference between this and the existing product is that the previous logic modifies the source code that is generated by the precompiler before the compiler sees it. Because the intermediate source code is not available when using the integrated coprocessor, the object code must be modified instead. Therefore, when using this feature, the processing logic is the same as before except that the object is updated rather than the source.
 
When not using the coprocessor, the existing code will continue to work as it always has:

Sample JCL:
//*
//* ************************************************************
//* * *
//* * Bind Manager *
//* * Language Coprocessor Support *
//* * Sample JCL *
//* * *
//* ************************************************************
//*
//*
//* -----------------------------------------------------
//* Save a working copy of the "old" (preexisting) DBRM
//* -----------------------------------------------------
//*
//COPY EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=DBRM.LIBRARY(PROGNAME)
//SYSUT2 DD UNIT=SYSALLDA,DISP=(,PASS),SPACE=(TRK,15,RLSE),
// LRECL=80,RECFM=FB,DSN=&&OLDDBRM
//*
//*
//* ----------------------------
//* Compile the source program
//* ----------------------------
//*
//* JCL for the compiler step goes here; the JCL must
//* contain a statement similar to the following --
//*
//* //SYSLIN DD UNIT=SYSALLDA,DISP=(,PASS),
//* // SPACE=(TRK,(15,15),RLSE),
//* // DSN=&&OBJ
//*
//*
//* ----------------------------------------------------------
//* Run Bind Manager to see whether the bind may be bypassed
//* ----------------------------------------------------------
//*
//BND1 EXEC PGM=BNDAVB1
//STEPLIB DD DISP=SHR,DSN=BIND.MANAGER.LOADLIB
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//OLDDBRM DD DISP=OLD,DSN=&&OLDDBRM
//NEWDBRM DD DISP=OLD,DSN=DBRMLIB(PROGNAME)
//OBJECT DD DISP=(OLD,PASS),DSN=&&OBJ
//SYSUT1 DD UNIT=SYSALLDA,DISP=(,PASS),SPACE=(TRK,(15,15),RLSE)
//*
//*
//* ---------------------------
//* Link-edit the load module
//* ---------------------------
//*
//* JCL for the linkage editor (MVS binder) goes here. The
//* &&OBJ data set referenced above should be used as input.
//*
//*
//* ------------------
//* Bind the program
//* ------------------
//*
//* JCL to bind the program in DB2 goes here. The EXEC statement
//* must include the following parameter:
//*
//* COND.BND1=(0,LT)
//*
//* The COND parameter will insure that the bind is skipped
//* when Bind Manager returns condition code 0, and executed
//* otherwise.
//*

[{"Product":{"code":"SSCVQTD","label":"IBM Db2 Administration Tool for z\/OS"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"DB2 Bind Manager","Platform":[{"code":"PF025","label":"Platform Independent"},{"code":"PF035","label":"z\/OS"}],"Version":"2.1.0","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
12 February 2021

UID

swg21168397