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



Do you really need that function? Back in the stone age RPG developers
used to insist that all columns in a table have a prefix (or a suffix)
that indicated which file the column came from. So, not only did you have
6 character column limitations but two of those had to be used to indicate
the table that the column came from. 10-15 years ago IBM allowed 10
character column names to be used in RPGLE. About that same time they
also allowed F specs to do things like prefix columns, or even qualify
them. So, now you could say
FMyTable prefix(MyTable.)
And your columns would appear as:
MYTABLE.ORDERNO
MYTABLE.CUSTOMER#
...
What I am getting to is why should your column in your actual table be
named different than the column in your field reference table? Why
shouldn't you use ORDERNO in both the order header and the order detail
tables?
The new prefixing and QUALIFIED handle the previous issues. I actually
had a canned software package that made like fields all the same and
manually used I specs to rename fields before PREFIX and QUALIFIED. Doing
so then allows you to use standard database techniques like
SELECT COLUMN_NAME, TABLE_NAME, TABLE_SCHEMA, DATA_TYPE, LENGTH,
NUMERIC_SCALE
FROM syscolumns
WHERE column_name='MYCOLUMN'
A statement that works on both the i and on MS SQL Server.

SYSCOLUMNS resides in QSYS2. Which has been part of the system library
list for a few releases now.
This cross reference capability came out in V3 of OS/400.

Rob Berendt

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.