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



On 10-Jun-2014 13:08 -0500, Rory Hewitt wrote:
Erick Garske on Tuesday, June 10, 2014 1:06 PM wrote:
Could someone point out an online reference for object naming
rules for the standard maximum ten character upper case alpha
numeric object names for files? I understand that hyphens are
illegal, but underscores are valid. What is the domain of valid
characters?

I seem to remember that it's possible to create an object with
lower-case characters, e.g. "a.b.c" (including the double-quotes),
e.g.:

CRTPF FILE(QTEMP/"a.b.c") RCDLEN(1)


Any example using any external object *other than* a program-described database *FILE object would be more appropriate, due to potential caveats /using/ the object created by the above quoted CRTPF request; e.g. a better example would be:
CRTDTAARA QTEMP/"a.b.c" *LGL

FWiW that specific request to CRTPF RCDLEN(specified) is best performed in two steps, if the faux-field or faux-record-format will ever be referenced by name; e.g. to establish a field name and a RcdFmt name with a known-to-be-valid "basic name" of EXAMPLE:
CRTPF QTEMP/EXAMPLE RCDLEN(1)
RNMOBJ QTEMP/EXAMPLE *FILE "a.b.c"

To further explain the reasoning for that two-step process [though later in my reply there is also a doc reference clarifying the "basic name" and the "quoted basic name" object naming]...

While a /QSYS.LIB external "object name" supports both the "basic name" naming and the expanded "quoted basic name", the Record Format name had for many releases, more restrictive naming rules. The above quoted CRTPF request implicitly generates a RcdFmt and a Field name that matches the file name. And although the Format and Field are merely logical representations, existing only for some implementation details, as they are not legitimately an /external/ definition because the /flat file/ has only a record length, some features might try to refer to them by name. Yet that name as a /short field name/ [is valid only as a long-name or ALIAS] and possibly also as a Record Format name, is illegal according to some Database (DB) [, Database Query, SQL Query, and\or Data Management] interfaces if\when the interface allows reference to either by name. Effectively, the database create feature breaks the naming rules for the names used for the faux-field and possibly for the RcdFmt, for a program-described file. With regard to the RcdFmt name, the DDS, at least, enforces the basic-naming rules in an R-Spec; I expect the same of the RCDFMT clause in the SQL DDL as well. The DDS and the SQL DDL both enforce the basic-naming rules for the short-name field-names\column-names. Whether or when an error will be encountered with either the record format name or field name that is outside the rules of "basic name" may not be entirely predictable; i.e. a reference to the name may or may not fail, and may not fail until an indirect reference is required [such as a SELECT * FROM... might function, and a SELECT "a.b.c" FROM... might even function, but a SELECT UPPER("a.b.c") FROM... might fail].

<http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rbam6/rbam6names.htm>
_Names_ (*NAME)
"When you create basic names and basic names in quoted form, follow these rules.

...

*NAME (basic name in unquoted form)

Every basic name can begin with the characters A-Z, $, #, or @ and can be followed by up to nine characters. The remaining characters can include the same characters as the first but can also include numbers 0-9, underscores (_), and periods (.). ...
...

*NAME (basic name in quoted form)

Every quoted name must begin and end with a quotation mark ("). The middle characters of a quoted name can contain any character except , *, ?, ', ", hex 00 through 3F, or hex FF, and is delimited by a slash. Quoted names allow you to use graphic characters in the name. The quoted form of basic names used in IBM-supplied commands can be no longer than 8 characters (not including the quotation marks). In your own commands, you can define parameters of type *NAME in quoted form with up to 254 characters (not including the quotation marks).

Note: Only basic names can be used in quoted form.
..."


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.