ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

ERRMSG and its effect on I/O

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ERRMSG and its effect on I/O

    I am working on an OLD RPGLE program that uses a DSPF that uses the ERRMSG keyword to display error messages. In my program, I modify some of the other i/O fields on the DSPF and re-display the record format whenever the ERRMSG keyword has been activated, For some reason the changes I make to the i/o fields are not recognized/displayed. This only happens when ERRMSG has been activated and the record format has been re-displayed. If no errors occurred and ERRMSG keyword has not been activated, no problem, the i/o changes are displayed. So, this seems to be tied to the use of ERRMSG.

    Is there a way around this other than changing the error handling to use a message subfile.

  • #2
    From the IBM manual, here: https://www.ibm.com/docs/en/i/7.4?to...-display-files
    - When an ERRMSG or ERRMSGID keyword is in effect, no processing other than the processing for these keywords is performed for the record. If neither keyword is in effect, the record is processed in the normal manner.
    Does that sound like the behavior you're seeing?

    Comment


    • #3
      Originally posted by Scott Klement View Post
      From the IBM manual, here: https://www.ibm.com/docs/en/i/7.4?to...-display-files


      Does that sound like the behavior you're seeing?
      Yes, that pretty much explains it. I ended up adding a message subfile to the DSPF and changed the program to do SNDPGMMSG to the MSG SFILE. Mission accomplished.

      Thanks for pointing that out.

      Comment

      Working...
      X