AS/400 RPGLE: Show all error messages on screen

450 pts.
Tags:
AS 400
RPGLE
There is a single record screen in which there are some input fields and we need validate the fields and show error message all at a time in the screen. How can I do that?
1

Answer Wiki

Thanks. We'll let you know when a new response is added.
Not know what error messages you are referring to you can do it a number of ways. Set only valid values in the DDS or set a msg place holder and populate it with your specific message, turn on the controlling indicator for the message and redisplay the screen then reset the msg and turn off indicator. The other option was listed by Splat and use the keyword he gave you.

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Splat
    To display messages for the entire display page, look into error message subfiles (the keywords SFLMSGRCD, SFLMSGKEY, SFLPGMQ are highly relevant) & the QMHSNDPM API.
    12,835 pointsBadges:
    report
  • vivekntt21
    Can we do it without message subfile? I want to validate all fields and display messages at a time in the screen for all fields?
    450 pointsBadges:
    report
  • azohawk

    It will really depend on the number of fields, data types of the fields, expected values of the fields, and how much information you want to display. Depending on these there are multiple ways to handle the errors. If I have a character field that only allows Y or N values, I will handle that in the DDS. If I need to verify the customer number, than my program needs to go back to the program to verify the customer number, then return an error notification (that depends on how I want to handle it) for the user to correct the invalid number.

    I don't like to use a lot of color on my screens, it makes them look busy. I typically stick to green for field labels, blue for instructions and white for imput or headers. But if a field has an error on verification, I will typically reverse image it.

    I have a project one time that I had to put 50 input fields on a single screen. all different sizes and data types, but it still had to be logical to fill out. There was no way to make this look nice. But I did use reverse image to draw attention to problems on verification. There was no way to allow space individual error messages either.

    3,990 pointsBadges:
    report
  • GregManzo
    I prefer not to use DDS validation because (a) the messages aren't very helpful, and (b) it becomes frustrating for the user to get error messages, fix those, then get more error messages.
    Viv, you really are best off using a message subfile. They aren't that hard to set up either.
    2,905 pointsBadges:
    report
  • vivekntt21
    Thanks, I will use message subfile but how to use DDS validation? Could you please explain?
    450 pointsBadges:
    report
  • ToddN2000
    One example of validation in DDS woud be say if you let the user select a report, S=Summary and D=Detial. The on the filed for entry it would look something like this. You can even set a default value.

    A            SUMDET         1A  B 13 37VALUES('S' 'D')
    A                                      DFTVAL('D')    
    125,970 pointsBadges:
    report
  • vivekntt21
    Here when user selects with some other option other than 'S' and 'D' then it is error right? How we will show error here?
    450 pointsBadges:
    report
  • ToddN2000
    When using VALUES, the system will display the following error at the bottom of the screen

    "Value entered for field is not valid.  Valid values listed in message help." 
    125,970 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: