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



Sorry for the late reply on this, but I said that SQL could not access Stored Procedures and User Defined Functions stored in a library with a (.) in the name. Even if you properly escape everything in the statement as you describe below. The problem is that while SQL can indeed find the definition of the stored procedure in the catalog, if the real qualified name of the object contains a (.), SQL gets confused because it does not properly escape the names in the catalog. So SELECT "MY.LIB".MYUDF() from ... reports Can't find object LIB.MYUDF~000 in library MY because the real name of the object in the catalog is MY.LIB.MYUDF~000. This may only affect JDBC and ODBC, that is where I was having trouble with it. Unfortunately I don't have a clean example right now.

But I do agree that MOST SQL objects can reside in a library with a (.) in the name without issue. You just have to escape the name.

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx


-----CRPence <CRPbottle@xxxxxxxxx> wrote: -----
To: rpg400-l@xxxxxxxxxxxx
From: CRPence <CRPbottle@xxxxxxxxx>
Date: 06/13/2014 11:01AM
Subject: Re: IBM Object naming rules

On 13-Jun-2014 08:29 -0500, Mark Murphy/STAR BASE Consulting Inc. wrote:
There are valid characters, and unfriendly characters. If you plan to
SQL, the period (.) is one of those unfriendly characters as it
interferes with the standard SQL name delimiter (in *SQL naming). But
even if you are using *SYS naming, SQL cannot access stored
procedures or user defined functions in libraries containing a period
(.).

To be sure, the SQL *can access* the objects in libraries where that
library name contains a period.

I haven't tried with a period in the object name itself, but I
suspect that it interferes there as well.

The same issue and resolution exist for any /object name/ as with the
/library object name/; as well the other /names/ such as columns,
routines, constraints, etc. can contain periods and be referenced.

The SQL provides support for any SQL identifier that includes a
period. A requirement to effect the reference to such an identifier is
that the SQL identifier must be delimited. The delimiter is the
double-quote character. An example referencing some identifiers with
embedded periods; using the new support for SQL naming within System
naming to show both qualifier characters [period and slash], and a
qualified column as well:

SELECT "ORD.LIB"."ORD.UDF"(T1."ORD.FIELD")
FROM "ORD.LIB"/"ORD.TABLE" AS T1

Note: the column name "ORD.FIELD" is a bit different [than the other
object names] in that statement, because the "ORD.FIELD" is the actual
name as stored and visually presented, whereas the other names as stored
and visually presented would generally be without delimiters.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.