This topic describes MSGID keyword.
MSGID(message-identifier [library-name/]message-file) MSGID(*NONE)
You can specify the message-file parameter in one of the following forms:
where the field3 length is two (2).
The field name must exist in the same record as the MSGID field, and the field must be defined as a character field with usage H, P, B, or O.
You should, for this form only, specify only special values for the file parameter. You cannot specify a library.
The special values are: U1, U2, P1, P2, M1, and M2. If the specified value is not one of these special values, U1 is used. See Table 1 for more information about these values.
When you code a special value for the message-file, the library parameter is not allowed and the library is set to *LIBL as default. See Table 1 for more information about these special values.
The following table describes the meaning of the special file values for the 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
book
.
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:
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.