Error: Indicator to be set *ON whe errors in entered values.
Message: Indicator to be set *ON when validations are OK and ready to
D Error S N
D Message S N
* Display screen until user presses F3.
* If errors in data validation, display error.
* If no erros in data validation and F6 pressed, display confirmation
Display confirmation message
* Display screen and clear error indicator.
* If user doesn't press F3, keep going.
IF NOT F3
* If user presses F6, validate data.
* Reset Message indicator and validate data. If no errors set Message *ON
so the program will display the confirmation message.
If errors in validations, set Error *ON
Else Set Message *ON
* If no F6 but Enter pressed, check if validation of data was OK.
* If validation of data was OK when F6 was pressed update the file.
* Clear Message and screen fields for next input operation
EVAL *INLR = *ON
Quote:> Can some one give me an example of how to program the following in RPG.
> I have an exfmt in a loop(F3), if the user presses F6 to update a record
> I would like to give them a message to press enter to confirm update
> otherwise they would cancel or end. F3 is the end key. My problem seems
> to be getting the messages to display at the right time. Sorry I don't
> have code with me.