PKLIST and NOPKLIST bind options

The PKLIST option determines the packages to include in a package list. The NOPKLIST option deletes packages from a package list.

Command option Option values Used with
  • PKLIST
  • NOPKLIST
(location-name.collection-id.package-id , …) PKLIST only

For PKLIST, the order in which you list packages with partial identifiers determines the search order at run time and can affect performance.

NOPKLIST is used with REBIND PLAN only. NOPKLIST determines that the plan is rebound without a package list. If a package list already exists, NOPKLIST deletes it.

If you specify REBIND PLAN for a plan that was bound prior to DB2® 10 and includes DBRMs, Db2 binds those existing DBRMs in the plan into packages. In this case, the PKLIST and NOPKLIST options have the following effects:

  • If you specify PKLIST, the resulting plan includes both the newly created DBRM packages and the packages in the specified package list. The DBRM packages are included at the front of the newly created package list.
  • If you specify NOPKLIST, any existing package lists are removed from the plan. NOPKLIST does not delete the package list that is created by binding the existing DBRMs into packages. However, if you use NOPKLIST a second time on the same plan that only contains package lists, all package lists are deleted.
(location-name) or (*)
Names the location of the DBMS where the package resides, or defers that choice until run time. Use either a particular location name or an asterisk (*), or omit this part of the identifier. The default is the local DBMS.
  • If you use a particular location name, then that DBMS should be defined in catalog table SYSIBM.LOCATIONS. If that table does not exist or if the DBMS is not in it, you receive warning messages.
  • If you use an asterisk, at run time the location comes from the special register CURRENT SERVER. Db2 checks privileges to use the SQL statements in the package at that location.
(collection-id) or (*)
Names the collection that contains the package or defers that choice until run time. Use either a particular collection ID or an asterisk (*). No default exists.
If you use an asterisk, then Db2 checks the privileges to use the SQL statements that are embedded in the package at run time. At that time also, Db2 determines the collection ID as follows:
  • If the value in the special register CURRENT PACKAGESET is not blank, then that value is the collection ID.
  • If the value of CURRENT PACKAGESET is blank, Db2 skips the entry unless it is the last entry in the package list. If it is the last or only entry, an error message is issued.
(package-id) or (*)
Names a particular package or specifies, by the asterisk, all packages in the collection. Because you cannot specify a version-id for the packages included in the package list, all versions are effectively included.

Default values for PKLIST

Process Default value
BIND PLAN None. You must specify PKLIST.
BIND PACKAGE N/A
REBIND PLAN Existing value
REBIND PACKAGE N/A

Catalog records for PKLIST and NOPKLIST

See SYSPACKLIST catalog table.