Not the sort of thing you'll find any examples of I suspect but ... and your example doesn't seem to match what you said as both fields still have different names don't they?

Anyway one way to map two fields to a single name would be via a DS. Like so:

Dcl-Ds AWfield;
AWField2 SamePos(AWField1);

This assumes that the fields are both alpha.

If numeric then this should work.

Dcl-Ds ReMapAWfields;
AWField2 SamePos(AWField1);
AWField like(AwField1);

Jon Paris

On May 6, 2022, at 4:15 PM, SReeves@xxxxxxxxxxxxxxxxxx wrote:

I'm not finding any examples of this for either in the 'old' fixed format
ways or how to do it in full free (**free); this may be because I don't
know the correct terminology of what it is called.

We have a file with multiple record formats (essentially merging two files
into one). When we utilize this file in RPG in fixed format and even in a
lot of Rpg free programs we drop out of free to do an I spec for the
record format. This basically points one field to another's name so that
so both fields can be referenced by a single field name within the

I AWField1 AVField1
I AWField2 AVField2

I'm wondering if there is a newer method of doing this in full **free
format, or are we stuck using this old method? Any kind of online article
or such regarding this would help in my learning if you know of one.


Shane Reeves

This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support by shopping at with our affiliate link:

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by 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.