I have a display file with 25 fields. I want to know whether some value is changed when user hits enter. Since I have many fields in display file, taking each one and comparing with the file field is a difficult task. Any other suggestions?
Software/Hardware used:
As400, RPG
ASKED:
February 7, 2013 5:07 AM
UPDATED:
February 7, 2013 1:17 PM
First, you would only have to make one comparison. All of the fields can be compared at once to see if anything changed. The values can be held in a data structure that can be compared to a saved version of the data structure.
You should also study the CHANGE (Change) keyword for display files. For 25 fields, you would possibly want to use the keyword at the record level.
The keyword does not tell you if input values are different from the output values. It only tells you if they have been changed. They might have been changed and then changed back to original values.
Tom