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



Barbara,

just a question.
In SQL tables it is possible to define columns with "case sensitive" and
"invalid" names, for example "My New Column" or "BugetPrice" or even
"Änderungs-Datum".
Is it possible to handle those column names when specifying the keyword
ALIAS?

(I'd try it, but I've currently no access to an i-Series with release 7.1)


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-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Barbara Morris
Gesendet: Friday, 07. October 2011 20:36
An: rpg400-l@xxxxxxxxxxxx
Betreff: Re: Referencing SQL Table Alternative Names in a RPG module

On 2011/10/7 1:19 PM, Andy Hautamaki wrote:
In an SQL Table we have descriptive alternative field names that from
what I can see from prior posts you can't refer to them in an RPG
module. (Not using embedded SQL)

In the compile listing for the externally defined file I notice it
doesn't bring them in for the record format so I get the fields not
defined compile error.

Is this just how things are and not something that is even on the radar
to change?


In V7R1, you can specify ALIAS on the D spec of an externally-described
DS and then the subfields will have the alternate names instead of the
short names.

You can also specify ALIAS on an F spec of any file that won't have I
and O specs generated by the compiler (no I/O specs if you specify
QUALIFIED, LIKEFILE, or define the file in a subprocedure). Then, if you
define a data structure using LIKEREC of one of the file's formats, the
subfields will get the alternate names.

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.