Converting to packages

You can convert transactions that use dynamic plan exits or switching techniques to use packages instead.

About this task

A transaction that currently uses a dynamic plan exit or dynamic plan switching techniques can be converted to use packages as follows:
  • Bind all of the DBRMs contained in the plan associated with the transaction into packages in a single collection.
  • Bind a new plan with a PKLIST containing a single wildcard entry for this collection.
  • Modify the DB2ENTRY entry for this transaction to use the new plan. Protected threads can now be used for this transaction to optimize thread reuse.
You could choose to have a single plan for the whole application, or one plan per transaction. The following sections give more detailed instructions for converting your transactions, based on this choice.

A similar approach can be taken for converting all CICS® applications, whether they use a dynamic plan exit or not.

Note that high-usage packages can be bound with RELEASE(DEALLOCATE), with low-usage packages bound with RELEASE(COMMIT). This results in the high-usage packages being retained in the plan's package directory until plan deallocation, while the low-usage packages are removed from the directory, and the space in the EDM pool is released. The disadvantage of this approach is that if you use RELEASE(DEALLOCATE) and then need to rebind a highly-used package, you must intervene to force deallocation of the package if it is allocated to a long-running thread. Consider that to rebind a package is less expensive than to rebind a plan, in terms of the time spent doing it.