AS/400: How to know whether field having value in a display file

250 pts.
Tags:
AS/400
DSPF
I have a display file with 1 field having length 2 Alphanumeric. I want to know whether that field having value or not without any I/O operation on DSPF (i.e. without Hit ENTER or press Function keys). Since I need to auto pop up the window as soon (i.e. at second position/last position of that field when user inputs some value window get populated) entering value into field. Any other suggestions?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 4  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.
  • TheRealRaven
    Try adding a CHECK() constraint to your input field:
    A            FLD1           2   B  3  3
    A                                      CHECK( MF ER )
    Combine MF and ER to cause the display file to return the value to your program when the user types into the field and fills it.

    The MF is 'Mandatory Fill' and requires input to be typed into both positions of the field. The ER is 'End of Record' and tells the display file to send the input to the program as soon as the last character is typed.
    34,940 pointsBadges:
    report
  • Nikrajpapa
    But how to handled it in Program.
    250 pointsBadges:
    report
  • ToddN2000
    The ER in the CHECK() functions like you pressed a function key. It will look for logic in your RPGLE that assumes some input was sent after your EXFMT was issued.
    132,520 pointsBadges:
    report
  • ToddN2000
    Thinking about this more, what if the data entered is incorrect? By automating this process you cannot stop it. This may cause more problems. If there is specific code you are looking for you may want to add the VALUES() reserved word to go along with your CHECK().
    132,520 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: