× 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.



Thank you all for your response. I don't like to hard code the
library names in the scripts. More maintenance when things change. I
thought that it was working as designed. I am trying to standardize
my code to SQL naming practices where possible.

Based on your responses, I will make a decision on which way to code.

Jim

On Tue, Feb 10, 2009 at 6:02 PM, CRPence <CRPbottle@xxxxxxxxx> wrote:
Jim Essinger wrote:
Just a quick question on SQL and the library list. When using
STRSQL to run some statements, I noticed that when using the
SQL naming convention (lib.file) it does not seem to use the
library list to find the file if the library is not specified.
When I go into F13 and change the session defaults to *SYS for
the naming convention (lib/file), the files are found in the
library list without specifying the library explicitly.

Does this behavior also follow for the RUNSQLSTM command?

Can I make SQL to look in the library list for files while
using the SQL naming convention with STRSQL and/or RUNSQLSTM?


System naming is representative of what the operating system would
do; i.e. the expectation that unqualified object names would be searched
for in the library list. SQL naming is representative of what the SQL
would do as defined by the standards. There is no hybrid of *SQL naming
such that there is additionally support of *SYS [aka *LIBL] for
unqualified file names; i.e. in SQL naming, an unqualified file name
must be searched for _only_ in the SCHEMA for the current\established
/authorization ID/ [for the session]. There is at least one extension
[not sure if standard] whereby the /default schema/ can identify an
alternative name to the /authorization identifier/. Note: executables
use the SQL PATH, which like a library list can be a search across
multiple libraries.

However the OS does provide an /override/ feature which enables a
variation to the SQL naming [which is limited to one library name] to
enable the use\search of the library list for a file name for _some_
statements; e.g. those effecting I/O, like SELECT, UPDATE, DELETE. The
library list can be forced explicitly using:
OVRDBF ShortName TOFILE(*LIBL/ShortName) OVRSCOPE(as_appropriate)

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/db2/rbafzmstch2nam.htm#ch2nam
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/db2/rbafzmstch2nam.htm#qualun
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/db2/rbafzmstch2auth.htm#ch2auth

Regards, Chuck
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.