Conversion of DBRMs that are bound to a plan to DBRMs that are bound to a package
You must bind all DBRMs into a package, and bind the packages into a plan. One package can have only one DBRM.
The default REBIND PLAN COLLID (*) option converts all plans with DBRMs into plans with a package list. You can use this technique for local applications only. If the plan that you specify already contains both DBRMs and package lists, the newly converted package entries will be inserted into the front of the existing package list.
For more information on developing a strategy for converting your plans to include only packages, see DB2® 9 for z/OS®: Packages Revisited (IBM Redbooks).
Example: converting all plans
The following examples converts all DBRMs that are bound with plan X into packages under collection ID: DSN_DEFAULT_COLLID_X.
REBIND PLAN(X) COLLID(*);
Example: specifying a collection ID
The following examples converts DBRMs that are bound with plan X into packages under the my_collection collection ID.
REBIND PLAN(x) COLLID('my_collection');
Example: rebinding multiple plans which may contain DBRMs
In the following example, BIND will traverse through each plan that is specified in the REBIND PLAN command statement and will convert the DBRMs accordingly, and until none of the DBRMs are bound with plans.
REBIND PLAN (X1, X2, X3) COLLID (collection_id|*);
Example: rebinding all plans which may contain DBRMs
In the following example, BIND will traverse through all plans that are specified in the SYSPLAN table and will convert the DBRMs accordingly, and until none of the DBRMs are bound with plans.
REBIND PLAN (*) COLLID (collection_id|*);
Example: specifying a package list
The following examples converts all DBRMs that are bound with plan X into packages under collection ID: DSN_DEFAULT_COLLID_X.
- If plan X does not have a package list, the newly converted package entries will be appended to the front of package list Z and then package list Z will be added to plan X.
- If plan X has both a package list and DBRMs, the newly converted package entries will be appended to the front of package list Z and then package list Z will replace the existing package list.
- If plan X has only a package list, then package list Z will replace the existing package list.
REBIND PLAN (x) COLLID (collection_id|*) PKLIST(Z);
Example: specifying no package list
The following examples converts all DBRMs that are bound with plan X into packages under collection ID: DSN_DEFAULT_COLLID_X.
- If plan X has both a package list and DBRMs, the existing package list will be deleted, and the new package list will be bound into plan X.
- If plan X has only DBRMs, the DBRMs will be converted into packages accordingly and added to plan X. The NOPKLIST option will be ignored.
- If plan X does not have DBRMs, then the existing package list, if any, will be deleted.
REBIND PLAN (x) COLLID (collection_id|*) NOPKLIST;