Hi Gio,
Am 13.08.2025 um 12:36 schrieb gio.cot via RPG400-L <rpg400-l@xxxxxxxxxxxxxxxxxx>:
In a program that manage DSPF, i would need to save all the record format fields before the EXFMT and then if the user press F3, i need to restore all the record format fields to their values before the EXFMT ..
Which could be an easy way to do that ?
My idea would be to define one unqualified data structure from the record format - and one qualified.
dcl-ds rcdfmtDS extname(...:*all) end-ds;
dcl-ds saveDS extname(...:*all) qualified end-ds;
Then save the record format before the EXFMT - and restore it afterwards if F3 was pressed:
eval-corr saveDS = rcdfmtDS;
exfmt ...;
if ...; // F3 condition
eval-corr rcdfmtDS = saveDS;
end-if;
This should work IMHO.
As the record format fields are "automatically synced" with the fields of the unqualified data structure, the data there is always the same as the record formats data - thank you RPG.
On the other side the saveDS is qualified - completely separated in memory - but easily transferable with EVAL-CORR.
HTH
Daniel
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.