MSGID keyword

This topic describes MSGID keyword.

You can specify the MSGID keyword in either of the following formats:
MSGID(message-identifier [library-name/]message-file)
MSGID(*NONE)

You can specify the message-file parameter in one of the following forms:

The following table describes the meaning of the special file values for the MSGID keyword.

Table 1. Special values on MSGID keyword
DDS special value Length 2 field value Message text retrieved
*USR1 U1 First level text from message file USR1
*USR2 U2 Second level text from message file USR2
*PGM1 P1 First level text from message file PGM1
*PGM2 P2 Second level text from message file PGM2
*SYS1 M1 First level text from message file SYS1
*SYS2 M2 Second level text from message file SYS2

For information about using message retrieval, see the Application Display Programming bookLink to PDF.

The *NONE parameter indicates that no message text is displayed.

The following example shows how to specify the MSGID keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A          R RECORD1
     A            MSGFIELD1     40A  B 02 10MSGID(CPD0001 *USR1)
     A            MSGFIELD2     10A  O 02 60MSGID(&MSGIDNUM &MSGFILENM);
     A            MSGFIELD3     80A  B 02 60
     A  99                                  MSGID(USR &MSGNBR +
     A                                      &MSGFILENM);
     A                                      MSGID(*NONE)
     A            MSGIDNUM       7A  P      TEXT('Message id')
     A            MSGFILENM      2A  P      TEXT('Message file name')
     A            MSGNBR         4A  P 07 01TEXT('Message number')
     A

When RECORD1 is displayed:

Related reference
MSGID (Message Identifier) keyword for display files