× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



It depends on what naming convention (*SQL Naming oder *SYS tem Naming) was
used at creation time.

If SQL Naming Conventions were used, all unqualified specified objects are
resolved at compile time.
The Tables or Views are searched in the current schema.
The schema to be used for the unqualified specified tables and views can
also set within the SET OPTION Statement.
Unqualified specified SQL Routines such as Stored Procedures or User Defined
Functions are searched within the current SQL Path.
Multiple Schemas can be specified within the SQL PATH and even the special
value *LIBL is allowed. The SQL Path to be used for resolving the
unqualified specified SQL Routines can also be set in the SET OPTION
Statement.
For dynamic SQL Statements with unqualified specified database objects, the
current schema at runtime is searched per default. But there an OPTION (in
the SET OPTION statement) where you can specify that the current schema at
compile time will also be used for dynamic SQL Statements.
Since all unqualified database objects are resolved at compile time ... the
library list at run time is ignored.

If System Naming conventions are used, for all unqualified specified
database objects, at runtime the current library list is searched.
Independent on whether tables, views or routines are unqualified specified
and independent on whether static or dynamic SQL is used.
The library list to be used at runtime can be set in the connection, or just
by executing a CL command (such as ADDLIBLE or CHGLIBL) called via QCMDEXC
(SQL Stored Procedure or User Defined Function)

Mit freundlichen Grüßen / Best regards

Birgitta Hauser
Modernization ? Education ? Consulting on IBM i


"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jack
Woehr via MIDRANGE-L
Sent: Donnerstag, 1. Dezember 2022 16:52
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: Jack Woehr <jwoehr@xxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Db2 UDF -- control library list?

How does one determine and direct the library list to be used by a Db2 User
Defined Function (UDF) when it executes?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.