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



Another aspect of using full quotes - if the long name is quoted, the system name will include quotes, too. So how does that matter?

As Birgitta says, the short name starts with the first 5 characters. If the name is quoted, those 5 characters include the full quote - and the generated name then must have a final full quote.

This means that the serial number will have only 4 digits. I also think that if you have enough long names - 100,000 or more in the non-quoted case, that the system names use the first 4 characters and 6 digits, then 3 characters and 6 digits, etc.

When using quotes, the possible number of generated system names is considerably less.

Again, I believe I saw this when I used generated long names once - it will need confirmation.\\Vern

On 6/11/2014 12:18 AM, Birgitta Hauser wrote:
SQL supports long SQL names and short system names.
If the "long" name is shorter or equal 10 characters, SQL and System Names
are identical.
For longer names the short name is automatically determined, taking the
first 5 characters of the long name and adding a 5 digit running no.
If you do not want the system name to be automatically created it is
possible to set it manually (even though the SQL/Long name is shorter or
equal 10 characters).

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"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!"


-----Ursprüngliche Nachricht-----
Von: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von Jonathan
Ball
Gesendet: Tuesday, 10.6 2014 21:37
An: rpg400-l@xxxxxxxxxxxx
Betreff: Re: IBM Object naming rules

On 6/10/2014 11:23 AM, John Rusling wrote:
Rory,

I just had to try it. <g>

Yep - when I run this

crtpf file(qtemp/"a.b.c") rcdlen(1)

wrkobjpdm shows -

Object Type Attribute Text
"a.b.c" *FILE PF-DTA

Then when I run this

runqry () qtemp/"a.b.c"

I get this

....+..
"a.b.c"
******** End of report ********

Never heard of this before. (and, cant think of when I'd need it)

John
It gets even goofier with SQL DDL tables:

create table mylib."this is my table oh yes it is" ("column name with
spaces" for colname char(5))

The 10-character object name is rendered as "this0001". Running DSPFFD
against the 10-character name shows a field of COLNAME, with an alternative
name of "column name with spaces". Running DSPFD against the 10-character
object name shows an alternative file name the same as the SQL table name.
The old admonishment, "just because you can do something doesn't mean you
should do it", comes to mind.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-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.