Overriding the values that Db2 uses to resolve package lists
Db2 resolves package lists by searching the available collections in a particular order. To avoid this search, you can specify the values that Db2 should use for package resolution.
About this task
If you set the special register CURRENT PACKAGE PATH or CURRENT PACKAGESET, Db2 skips the check for programs that are part of a plan and uses the values in these registers for package resolution.
- COLL1.PROG1.timestamp
- COLL2.PROG1.timestamp
- COLL3.PROG1.timestamp
- COLL4.PROG1.timestamp
If you set CURRENT PACKAGESET and not CURRENT PACKAGE PATH, Db2 uses the value of CURRENT PACKAGESET as the collection for package resolution. For example, if CURRENT PACKAGESET contains COLL5, Db2 uses COLL5.PROG1.timestamp for the package search.
When CURRENT PACKAGE PATH is set, the server that receives the request ignores the collection that is specified by the request and instead uses the value of CURRENT PACKAGE PATH at the server to resolve the package. Specifying a collection list with the CURRENT PACKAGE PATH special register can avoid the need to issue multiple SET CURRENT PACKAGESET statements to switch collections for the package search.
| Example | What happens |
|---|---|
|
The collection in PACKAGESET determines which package is invoked. |
|
The collections in PACKAGE PATH determine which package is invoked. |
|
The collections in PACKAGE PATH determine which package is invoked. |
|
PACKAGE PATH at server S2 is an empty string because it has not been explicitly set. The values from the PKLIST bind option of the plan that is at the requester determine which package is invoked.1 |
|
The collections in PACKAGE PATH that are set at server S2 determine which package is invoked. |
|
Three-part table name. On implicit connection to server S2, PACKAGE PATH at server S2 is inherited from the local server. The collections in PACKAGE PATH at server S2 determine which package is invoked. |
| Notes:
|
|