|
Well, you can use LIKEDS(GhkrAdlMjr) to define your wDS structure, but why use such a terse and uninformative DS name?
D wDS DS LikeDS(GhkrAdlMjr)
I'll suppose for now that you work in SEU, and find that typing the longer name is a chore... I do understand that argument, though it no longer applies to me, since I use Rational Developer and its LPEX editor to enhance my productivity... Perhaps a tools upgrade could help foster better standards that actually add value to your source by clarifying the data contexts that your app is using.
This example, GhkrAdlMjr.CstTy, I cannot decipher what this data element represents. I can see that this is a Customer Type field, but without some insider information, I can't see what the collection of fields is supposed to represent. I can imagine dozens of contexts that might include a customer type field, so this qualifier should help define that context... I might guess that Adl = Additional, but for the life of me, I can't think of a term for "Mjr" that might include a customer type field... That's the dilemma for me.
I really do believe that the Rational tooling for RPG developers is a tremendous help for shops that are looking to take their development to a higher level. It sounds glib, but with well-defined naming conventions, your RPG code can literally be read and understood by anyone. The tools take away the chore of typing long field names, help you to access and review externally defined data elements (/copy members, externally defined file record formats, etc.), provides wizards to help speed up common drudge work, ease of debugging, and many more... If I didn't get it from my employer, I would buy it for myself.
JMO,
-Eric DeLong
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Dave
Sent: Wednesday, April 25, 2012 6:10 AM
To: RPG programming on the IBM i / System i
Subject: Data structure field names
Hi,
One of our standards often imposes working with hideous data structure
names as parameters, which gives field name like
GhkrAdlMjr.CstTy for the customer type.
I'd like to be able to declare a local DS something like :
D wDS DS
D wCstTy
D wfld2
D etc.
which would have the same structure as GhkrAdlMjr. Then write :
wDS = GhkrAdlMjr;
And be able to refer to the customer type as wCstTy instead of
GhkrAdlMjr.CstTy throughout the procedure.
How can I do this? If I declare my wDS like the horribly named DS, my field
names will be wDS.wCstTy, etc.
Thanks.
--
This is the RPG programming on the IBM i / System i (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.
--
This is the RPG programming on the IBM i / System i (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 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.