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



Ignore my earlier response. Barbara's comment just made me realize what I had missed in your example.

Barbara is right - PREFIX is the way to go for this kind of rename.

If there is a reason why that won't work then my suggestion (adapted for the correct field names) would also work.


Jon Paris

On May 6, 2022, at 5:47 PM, Barbara Morris <bmorris@xxxxxxxxxx> wrote:

On 2022-05-06 4:15 p.m., 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.
...
Example
IRECFORR
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.

There's no full **free support for I specs. You could put your I specs into a /copy file so the rest of your code could be in **FREE.

But I think you could use the PREFIX keyword to handle this particular situation, assuming you just want to change 'AW' to 'AV' for all the field names. You would code PREFIX('AW' : 2) on the DCL-F.

You could even get rid of the AW and AV from both files, by coding PREFIX('' : 2).

--
Barbara

--
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,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


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.