DB2 10.5 for Linux, UNIX, and Windows

SET CURRENT PACKAGE PATH statement

The SET CURRENT PACKAGE PATH statement assigns a value to the CURRENT PACKAGE PATH special register.

This statement is not under transaction control.

Invocation

This statement can only be embedded in an application program. It is an executable statement that cannot be dynamically prepared.

Authorization

None required.

Syntax

Read syntax diagramSkip visual syntax diagram
                             .-=-.   
>>-SET CURRENT PACKAGE PATH--+---+------------------------------>

   .-,------------------------.   
   V                          |   
>----+-schema-name----------+-+--------------------------------><
     +-CURRENT PACKAGE PATH-+     
     +-+-CURRENT PATH-+-----+     
     | '-CURRENT_PATH-'     |     
     +-+-CURRENT USER-+-----+     
     | '-CURRENT_USER-'     |     
     +-SESSION_USER---------+     
     +-SYSTEM_USER----------+     
     +-USER-----------------+     
     +-host-variable--------+     
     '-string-constant------'     

Description

schema-name
Identifies a schema. The name must not be a delimited identifier that is empty or that contains only blanks (SQLSTATE 42815).
CURRENT PACKAGE PATH
The value of the CURRENT PACKAGE PATH special register before this statement executes.
CURRENT PATH
The value of the CURRENT PATH special register.
CURRENT USER
The value of the CURRENT USER special register.
SESSION_USER
The value of the SESSION_USER special register.
SYSTEM_USER
The value of the SYSTEM_USER special register.
USER
The value of the USER special register.
host-variable
Contains one or more schema names, separated by commas. The host variable must:
  • Be a character-string variable (CHAR or VARCHAR). The actual length of the contents of the host variable must not exceed the length of the CURRENT PACKAGE PATH special register.
  • Not be the null value. If an indicator variable is provided, its value must not indicate a null value.
  • Contain an empty or blank string, or one or more schema names separated by commas.
  • Be padded on the right with blanks if the actual length of the host variable is greater than the content.
  • Not contain CURRENT PACKAGE PATH, CURRENT PATH, CURRENT_PATH, CURRENT USER, CURRENT_USER, SESSION_USER, SYSTEM_USER, PATH, or USER.
  • Not contain a delimited identifier that is empty or that contains only blanks.
string-constant
Specifies a character string constant that contains zero, one, or more schema names that are separated by commas. The string constant must:
  • Have a length that does not exceed the maximum length of the CURRENT PACKAGE PATH special register.
  • Not contain CURRENT PACKAGE PATH, CURRENT PATH, CURRENT_PATH, CURRENT USER, CURRENT_USER, SESSION_USER, SYSTEM_USER, PATH, or USER.
  • Not contain a delimited identifier that is empty or that contains only blanks.

Rules

Notes

Examples