Marc's Place


FN_E$MSG - Send a program message

Inclusion in RPG source

. . .
. . .

Inclusion in DSPF source

 A          R SFLMSG                    SFL
 A                                      SFLMSGRCD(24)
 A            #MKEY                     SFLMSGKEY
 A            ##PGM                     SFLPGMQ
 A          R SFLMSGC                   SFLCTL(SFLMSG)
 A                                      OVERLAY
 A                                      SFLSIZ(0002)
 A                                      SFLPAG(0001)
 A                                      SFLDS
 A                                      SFLDSPCTL
 A                                      SFLINZ
 A  80                                  SFLEND
 A            ##PGM                     SFLPGMQ



Input Parameters

MSGID (a7)
Field to contain a OS/400 message-id or one out of your own message-files. If empty (=*BLANKS), the message-queue is cleared.
MSGQUE (a10)
Field to contain a OS/400 message-queue to send the message to. Defaults to *SAME.
MSGFIL (a20)
Field to contain a OS/400 message-file from which the message text should be retrieved. Defaults to '*LIBL E$ERRMSG '
MSGDT (a132)
Field to contain message data to fill the variables defined in the message.

Output Parameters


What it does

The routine sends a message by calling the program E$PGMMSG. After that, you should send the record format SFLMSGC before the next EXFMT statement.


C                     ...
C                     EXSR SRPOS1
C  N04                WRITEFMT#99F                     Function key info
C   04                WRITEFMT#99O                     Options info
C                     WRITESFLMSGC                     Message queue
C                     EXFMTFMTCTL#1
C                     CLEARMSGID                       Clear message queue
C                     EXSR E$MSG
C                     SELEC
C           ##KEY     WHEQ F4
C                     EXSR SRF04
C                     ...
C                     ...
 * Test field value:
C           #FLD1     CHAINDBFILE2              99  
C           *IN99     IFEQ *ON
C           #FLD1     OREQ *BLANK
C                     MOVEL'ERR0001' MSGID             Error message ID
C                     EXSR E$MSG                       Write to message queue
C                     SETON                     9540
C                     ENDIF
C                     ...
Go to download page
© 1997- Marc Vos (and others)   -   Privacy Statement   -    Contact Me

On this website, Google Analytics is used to track visitor statistics. These are anonymised data about the number of visitors, which pages they visit on this site, from which regions they visit, which web browsers they use, etc.. You will also see non-personalised ads via Google AdSense. Cookies from Paddle or Paypal are placed when you click on a 'Buy now!' or 'Donate!' button, and possible cookies from Disqus when you use that system to comment on one or more blogposts.
Privacy Statement