CURRENT PATH special register
The CURRENT PATH (or CURRENT_PATH) special register specifies a VARCHAR(2048) value that identifies the SQL path used when resolving unqualified function names, procedure names, data type names, global variable names, and module object names in dynamically prepared SQL statements. CURRENT FUNCTION PATH is a synonym for CURRENT PATH.
The initial value is the default value specified in a following paragraph. For static SQL, the FUNCPATH bind option provides an SQL path that is used for function and data type resolution.
"FERMAT","XGRAPHIC","SYSIBM"
The default value is
SYSIBM
,SYSFUN
,SYSPROC
,SYSIBMADM
,SYSHADOOP
,X,
where X is the value of the USER special register, delimited by double
quotation marks. The value can be changed by invoking the SET CURRENT PATH statement. The schema
SYSIBM does not need to be specified. If it is not included in the SQL path, it is implicitly
assumed to be the first schema. SYSIBM does not take up any of the 2048 bytes if it is
implicitly assumed.
A data type that is not qualified with a schema name will be implicitly qualified with the first schema in the SQL path that contains a data type with the same unqualified name. There are exceptions to this rule, as outlined in the descriptions of the following statements: CREATE TYPE (Distinct), CREATE FUNCTION, COMMENT, and DROP.
SELECT ROUTINENAME, ROUTINESCHEMA FROM SYSCAT.ROUTINES
WHERE POSITION (ROUTINESCHEMA, CURRENT PATH, CODEUNITS16) <> 0