What to bind after a program change

If you change a program, you must prepare it and rebind it before it can be used.

About this task

For an overview of the bind process, see The bind process. For an overview of plans and packages, see Plans, packages and dynamic plan exits.

The example in Figure 1 shows a CICS® transaction consisting of four program modules. It is not unusual that the number of modules is high in a real transaction. This section describes what you must do if one module is changed.
Figure 1. Application consisting of four program modules
Module A is the main module. Module A calls Module B. Module A also calls Module C, and Module C calls Module D.

Assuming that at least one SQL statement changed in program C, you must perform the following procedure to prepare the program and to make the transaction executable again.

Procedure

  1. Precompile the program on DB2®.
  2. Translate the program using the CICS translator.
  3. Compile the host language source statements.
  4. Link-edit.
  5. If the DBRM for program C was bound into a package, bind that package using the new DBRM, and all the application plans that use program C will automatically locate the new package.
  6. If the DBRM for program C was bound directly into any application plans, locate all the application plans that include the DBRM for program C. Bind all the application plans again, using the DBRMs for all the programs directly bound into them, to get new application plans. For the programs that were not changed, use their old DBRMs. Note that you cannot use the REBIND subcommand, because input to REBIND is the plan and not the DBRMs.
    Note: If you have not used packages before, note that using packages simplifies the rebinding process. You can bind each separate DBRM as a package and include them in a package list. The package list can be included in a PLAN. You can then use the BIND PACKAGE command to bind the DBRMs for any changed programs, instead of using the BIND PLAN command to bind the whole application plan. This provides increased transaction availability and better performance. See Using DB2 packages for more information on using packages.