Thursday, February 14, 2008

Setting up for an unqualified call of a DB2 stored procedure

Set up a Data source via the DB2 Configuration Assistant depending on the region
such as Development, Systems, Acceptance or Production etc.
After the Data source is created, right click on it and select 'CLI Settings'.
Click on the 'Settings' tab and add a keyword called 'CurrentFunctionPath'.
In the value tab add the following:

mySCHEMA, SYSIBM, SYSFUN, SYSPROC

where "mySCHEMA" = the schema used to resolve function references and data type references in dynamic SQL statements. This option is used as part of the process for resolving unqualified function references that may have been defined in a schema name other than the current user's schema. Note that if SYSIBM is not specified then it will be added as the first element.

Test you stored proc by calling it using "PC SAS" or "QMF for Windows" or
"Business Objects" by pointing to the newly created data source and without
the schema name.

No comments: