On 01-Apr-2014 15:09 -0700, Chris Bipes wrote:
<<SNIP>> I want to define a standard and move in that direction to
avoid library list issues in the future. <<SNIP>>
There are several "client" special registers available to the SQL at
the server, from values that can be established by the client; e.g. the
Client Application Name via CURRENT CLIENT_APPLNAME
A stored procedure invoked by an application [or possibly invoked via
an exit instead, if SQL is allowed and does not impair the SQL that
would run in the connection and the library list was already established
for the connection at that exit point] could establish the library list
according to the application name.
IBM i 7.1 Information Center -> Database -> Reference -> SQL reference
-> Language elements
"A special register is a storage area that is defined for an application
process by database manager and is used to store information that can be
referenced in SQL statements.
The CURRENT CLIENT_APPLNAME special register specifies a VARCHAR(255)
value that contains the value of the application name from the client
information specified for the current connection.