The following example may help.
Create message & message file
CRTMSGF MSGF("work library"/USERMSG)
ADDMSGD MSGID(MSG0001) MSGF("work library"/USERMSG) MSG('&1 is invalid.
Entry must be &2') FMT((*CHAR 8) (*CHAR 8))
Create display file......
A DSPSIZ(24 80 *DS3)
A CA01
A ERRSFL
A MSGLOC(22)
A R RECORD1
A OVERLAY
A FIELD1 1A I 3 2
A 50 ERRMSGID(MSG0001 USERMSG &MDTA)
A
A MDTA 78A P
A R CMDKEY
A OVERLAY
A 23 4'F1=End'
Create RPG
FTSTMSGFMCF E WORKSTN
*
C MOVE *ON CHECK 1
*
C *INKA DOWNE*ON
C CHECK ANDEQ*ON
* Display screen...
C WRITECMDKEY
C EXFMTRECORD1
* Validate...
C FIELD1 IFNE 'Y'
C FIELD1 ANDNE'N'
C SETON 50
C MOVELFIELD1 DATA 16
C MOVE 'Y or N 'DATA
C MOVELDATA MDTA
C ELSE
C SETOF 50
C MOVE *OFF CHECK
C ENDIF
*
C ENDDO
*
C SETON LR
C RETRN
Markjstev <mark...@aol.com> wrote in article
<19971107024...@ladder02.news.aol.com>...
The things I check for when my messages don't display are the use of the
OVERLAY keyword, either at the file, or record level AND to make sure the
indicator the message is conditioned on isn't getting SETOFF before the
display of the record. Sounds simple, but sometimes it happens!
---------------------------------------------------------------------
Ann Gerling
SPANS Consulting Group
AS/400 Consulting & Contract Programming
email: ager...@nemonet.com
Phone/FAX 573.985.7726
--------------------------------------------------------------------