Skip to content

BIND PLAN Example

This section presents a simple example of how a production BIND PLAN command can be modified by templates in the Db2 Option so that the same application can be bound for unit testing, systems testing, and production execution in the same Db2 subsystem.

CMNDB2PL - BIND Command describes the process used by plan lookup program CMNDB2PL to determine what plans and packages need to be bound and to locate the required BIND command member. This example assumes that the BIND PLAN command member is staged in the change package that is being promoted and installed.

This is the production BIND PLAN command in member PRDAPPL1, which is staged in the change package:

BIND PLAN(PRDAPPL1)         -
PKLIST (COLLP.\*)           -
QUALIFIER(APPL1P)           -
ACTION (REPLACE)            -
ISOLATION (CS)              -
RETAIN                      -
EXPLAIN (NO)                -
VALIDATE(BIND)              -
ACQUIRE(USE)                -
RELEASE(COMMIT)

These are the active libraries defined for the application in the Db2 Option on panel CMNLD2AL:

CMNLD2AL               Db2 Active Library List                Row 1 to 9 of 9 
Command ===\> ______________________________________________ Scroll ===\> CSR 

      Logical     Bind 
      name        /SQL        Db2 active library name

_____ UNIT         B          CMNTP.UNIT.ACTP.LOADLIB
_____ UNIT         B          CMNTP.UNIT.ACTP.PKGBIND
_____ UNIT         B          CMNTP.UNIT.ACTP.PLANBIND
_____ SYST         B          CMNTP.SYST.ACTP.LOADLIB
_____ SYST         B          CMNTP.SYST.ACTP.PKGBIND
_____ SYST         B          CMNTP.SYST.ACTP.PLANBIND
_____ PROD         B          CMNTP.PROD.ACTP.LOADLIB
_____ PROD         B          CMNTP.PROD.ACTP.PKGBIND
_____ PROD         B          CMNTP.PROD.ACTP.PLANBIND

****************************** Bottom of data ******************************

Promote to Unit Test

When the change package containing BIND PLAN member PRDAPPL1 is promoted to the unit test level, PRDAPPL1 in the staging library is copied to library CMNTP.UNIT.ACTP.PLANBIND.

Note

For a new output BIND OWNER command when OWNER is not present, requires the CMN$$PRM skeleton to be modified with the INSERT value for the AUTHORITY= statement. See Add an Owner Parameter.

This is an active library for the application in the Db2 Option. This active library is associated with the UNIT logical subsystem, so the BIND command in member PRDAPPL1 is templated according to the rules in logical subsystem UNIT.

This is the Db2 Logical Subsystem UNIT Templates panel CMNGD2L2:

CMNGD2L2                    Db2 Logical Subsystem UNIT Templates 
Command ===\> ___________________________________________________________________

 Templates         Target              Source               Insert 
 General: 
  Schema . . . . . __________________ + __________________ + __________________
  Qualifier . . .  ?????T             + __________________ + __________________ +
  Bind owner . . . __________________ + __________________ + UNIT               + 

  WLM Env . . . .  __________________ + __________________ + __________________ 

  Plan: 
   Name . . . . .  TST                  PRD 

  Package: 
   Location . . .  __________________ + __________________ + __________________
   Collection . .  ????T              + __________________ + __________________

Staged BIND PLAN command member PRDAPPL1 is compared to the BIND command after CMNDB2PL applies templates from logical subsystem UNIT:

Input BIND Command Output BIND Command
BIND PLAN(PRDAPPL1) -
PKLIST (COLLP.*) -
QUALIFIER(APPL1P) -
ACTION (REPLACE) -
ISOLATION (CS) -
RETAIN -
EXPLAIN (NO) -
VALIDATE(BIND) -
ACQUIRE(USE) -
RELEASE(COMMIT)
BIND PLAN(TSTAPPL1) -
PKLIST (COLLT.*) -
QUALIFIER(APPL1T) -
ACTION (REPLACE) -
ISOLATION (CS) -
RETAIN -
EXPLAIN (NO) -
VALIDATE(BIND) -
ACQUIRE(USE) -
RELEASE(COMMIT) -
OWNER(UNIT)

Note

The order of keyword options in the output BIND command may not match the input order. See BIND Command Keyword Option Order.

The templated BIND command is executed in the promotion job.

Promote to System Test

When the change package containing BINDPLAN member PRDAPPL1 is promoted to the system test level, PRDAPPL1 in the staging library is copied to library CMNTP.SYST.ACTP.PLANBIND.

This is an active library for the application in the Db2 Option. This active library is associated with the SYST logical subsystem, so the BIND command in member PRDAPPL1 is templated according to the rules in logical subsystem SYST.

This is the Db2 Logical Subsystem SYST Templates panel:

CMNGD2L2                    Db2 Logical Subsystem SYST Templates 
Command ===\> ___________________________________________________________________

 Templates         Target              Source               Insert 
 General: 
  Schema . . . . . __________________ + __________________ + __________________
  Qualifier . . .  ?????S             + __________________ + __________________ +
  Bind owner . . . __________________ + __________________ + SYST               + 

  WLM Env . . . .  __________________ + __________________ + __________________ 

  Plan: 
   Name . . . . .  SYS                  PRD 

  Package: 
   Location . . .  __________________ + __________________ + __________________
   Collection . .  ????S              + __________________ + __________________

Staged BIND PLAN command member PRDAPPL1 is compared to the BIND command after CMNDB2PL applies templates from logical subsystem SYST:

Input BIND Command Output BIND Command
BIND PLAN(PRDAPPL1) - BIND PLAN(SYSAPPL1) -
PKLIST (COLLP.*) - PKLIST (COLLS.*) -
QUALIFIER(APPL1P) - QUALIFIER(APPL1S) -
ACTION (REPLACE) - ACTION (REPLACE) -
ISOLATION (CS) - ISOLATION (CS) -
RETAIN - RETAIN -
EXPLAIN (NO) - EXPLAIN (NO) -
VALIDATE(BIND) - VALIDATE(BIND) -
ACQUIRE(USE) - ACQUIRE(USE) -
RELEASE(COMMIT) RELEASE(COMMIT) -
OWNER(SYST)

Note

The order of keyword options in the output BIND command may not match the input order. See BIND Command Keyword Option Order.

The templated BIND command is executed in the promotion job.

Install and Baseline Ripple

When the change package containing BIND PLAN member PRDAPPL1 is baselined, PRDAPPL1 in the staging library is copied to library CMNTP.PROD.ACTP.PLANBIND.

This is an active library for the application in the Db2 Option. This active library is associated with the PROD logical subsystem, so the BIND command in member PRDAPPL1 is templated according to the rules in logical subsystem PROD.

This is the Db2 Logical Subsystem PROD Templates panel:

CMNGD2L2                    Db2 Logical Subsystem PROD Templates 
Command ===\> ___________________________________________________________________

 Templates         Target              Source               Insert 
 General: 
  Schema . . . . . __________________ + __________________ + __________________
  Qualifier . . .  __________________ + __________________ + __________________ +
  Bind owner . . . __________________ + __________________ + PROD               + 

  WLM Env . . . .  __________________ + __________________ + __________________ 

  Plan: 
   Name . . . . .  ________              ________ 

  Package: 
   Location . . .  __________________ + __________________ + __________________
   Collection . .  __________________ + __________________ + __________________

Staged BIND PLAN command member PRDAPPL1 is compared to the BIND command after CMNDB2PL applies templates from logical subsystem PROD:

Input BIND Command Output BIND Command
BIND PLAN(PRDAPPL1) - BIND PLAN(PRDAPPL1) -
PKLIST (COLLP.*) - PKLIST (COLLP.*) -
QUALIFIER(APPL1P) - QUALIFIER(APPL1P) -
ACTION (REPLACE) - ACTION (REPLACE) -
ISOLATION (CS) - ISOLATION (CS) -
RETAIN - RETAIN -
EXPLAIN (NO) - EXPLAIN (NO) -
VALIDATE(BIND) - VALIDATE(BIND) -
ACQUIRE(USE) - ACQUIRE(USE) -
RELEASE(COMMIT) RELEASE(COMMIT) -
OWNER(PROD)

Note

The order of keyword options in the output BIND command may not match the input order. See BIND Command Keyword Option Order. |

The templated BIND command is executed in the installation job.