PATH bind option
The PATH option determines the SQL path that Db2 uses to resolve unqualified stored procedure names in CALL statements, in user-defined data types, and in functions.
| Command option | Option values | Used with |
|---|---|---|
| PATH |
|
- The PATH bind option is not valid for REBIND of packages for native SQL procedures or advanced triggers.
- The specified schema names are not folded to uppercase by Db2. This behavior is different than that for schema names in SQL statements, which are folded to uppercase before being stored in the catalog. If you do not specify these nondelimited schema names in upper case, Db2 cannot find a match in the catalog for those schema names.
- You can specify delimited identifiers in both mixed and uppercase characters.
The PATH keyword is mutually exclusive with the PATHDEFAULT keyword. Do not specify both keywords in the same REBIND command.
- PATH(schema-name)
- Identifies a schema.
- PATH(schema-name , …)
- Identifies a list of schemas. The same schema name should not appear more than once in the SQL path. The number of schemas that you can specify is limited by the length of the resulting SQL path, which cannot exceed 2048 bytes. To calculate the length of the resulting SQL path:
- Take the length of each schema.
- Add 2 for delimiters around each schema-name in the list.
- Add 1 for each comma after each schema. Do not add 1 for the last schema.
- PATH(USER)
- Represents a maximum 128-byte schema-name . At bind time, Db2 includes this 128-byte length in the total length of the list of schema names specified for the PATH bind option. The maximum length for a list of schema names, including comma separators, delimiters, and the 128-byte USER value, is 2048 bytes. If you exceed this limit, Db2 generates an error message at bind time.
At run time, Db2 substitutes the run time value of the USER special register, which contains the primary authorization ID of the run time process, for the schema-name in the position of USER in the PATH schema-name list.
If you specify USER in a list of schema names, do not use delimiters around the USER keyword.
Db2 does not validate that the specified schema actually exists at precompile or at bind time.
You do not need to explicitly specify the SYSIBM, SYSFUN, SYSPROC, and SYSIBMADM schemas; Db2 implicitly assumes that these schemas are at the beginning of the SQL path. Db2 adds these schemas in the order listed. If you do not specify the SYSIBM, SYSFUN, and SYSPROC schemas, they are not included in the 2048-byte length.
SYSPUBLIC must not be specified for schema-name.
Interactions with the PLANMGMT option: If you plan to change this option and the PLANMGMT option in a REBIND command, see PLANMGMT bind option for the implications.
Default values for PATH
| Process | Default value |
|---|---|
| BIND SERVICE | SYSIBM, SYSFUN, SYSPROC, SYSIBMADM, service-qualifier |
| BIND PLAN | SYSIBM, SYSFUN, SYSPROC, SYSIBMADM, plan-qualifier |
| BIND PACKAGE | SYSIBM, SYSFUN, SYSPROC, SYSIBMADM, package-qualifier |
| REBIND PLAN | Existing value |
| REBIND PACKAGE | Existing value |
Catalog records for PATH
See the PATHSCHEMAS column in SYSPACKAGE catalog table.
The default values for BIND PLAN and BIND PACKAGE are not stored in the catalog. The default values in the catalog are a zero-length string.
Db2 for z/OS® accepts FUNCPATH as a synonym for PATH when FUNCPATH is received from a remote requester. However, FUNCPATH cannot be specified on a BIND or REBIND command.