Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

MSG( ) Output message text

&pagelevel(3)&pagelevel

Domain: Command return codes (messages)

The MSG( ) function supplies the message text assigned to the specified message code; this is done in the specified language and in the specified output format.

For some SDF-P commands, the message code may have been previously requested from the command return code, using the MAINCODE( ) function.

Format

MSG( )

MSG-IDENTIFICATION = string_expression

,LANGUAGE = *STD / *ENGLISH / *GERMAN

,INSERT-00 = *NONE / string_expression

,INSERT-01 = *NONE / string_expression

: : :

,INSERT-29 = *NONE / string_expression

,MSG-STRUCTURE-OUTPUT = *NONE / *SYSMSG

Result type

STRING (<string>)

Input parameters

MSG-IDENTIFICATION = string_expression
string_expression contains the 7-byte message code in the following format:

Bytes 1-3:

Letters identifying the message class

Bytes 4-7:

Digits 0-9, letters A-F as the hexadecimal representation of the exact error number

LANGUAGE = *STD / ENGLISH / *GERMAN
The English or German message text is output.
The default setting is *STD, i.e. the output is displayed using the default language setting of the task. The (previous) operand values *E for *ENGLISH and *D for *GERMAN will continue to be supported for compatibility reasons.

INSERT-nn = *NONE / string_expression
Designates the additional content of a message.

MSG-STRUCTURE-OUTPUT =
Specifies whether or not variables for the output of messages must be created and sent on.

MSG-STRUCTURE-OUTPUT = *NONE
Variables for the output of messages are not sent on via S variable stream SYSMSG. The message text is not supplied by the command /HELP-MSG-INFORMATION MSG-ID=*LAST.

MSG-STRUCTURE-OUTPUT = *SYSMSG
If messages are guaranteed, variables for the output of messages are sent on via S variable stream SYSMSG. The message text can be obtained by the command
/HELP-MSG-INFORMATION MSG-ID=*LAST.

Result

Message text in the form of a string.

Null string ('') means:
No text has been assigned to this message code.

Error messages

SDP0413     ILLEGAL LENGTH
SDP0418     INVALID MSG-IDENTIFICATION

Example

/DECLARE-VARIABLE MIP(TYPE=*STRUCTURE(*DYNAMIC)),MULTIPLE-ELEMENTS=*LIST 
/ASSIGN-STREAM SYSMSG,TO=*VARIABLE(MIP)
/A=MSG(MSG-IDENTIFICATION='SDP1018',“This message is guaranteed” -
/                 INSERT-00='MY-VARIABLE', -
/                 MSG-STRUCTURE-OUTPUT = *SYSMSG)
/B=MSG(MSG-IDENTIFICATION='SDP1010',“This message is NOT guaranteed” -
/                 INSERT-00='MY-SECOND-VARIABLE', -
/                 MSG-STRUCTURE-OUTPUT = *SYSMSG)
/SHOW-VARIABLE *ALL
A = %  SDP1018 VARIABLE 'MY-VARIABLE' ALREADY EXISTS, BUT WITH OTHER 
ATTRIBUTES
B = %  SDP1010 VARIABLE 'MY-SECOND-VARIABLE' HAS NO VALUE
MIP(*LIST).MSG-TEXT = % SDP1018 VARIABLE 'MY-VARIABLE' ALREADY EXISTS BUT 
WITH OTHER ATTRIBUTES'
MIP(*LIST).MSG-ID = SDP1018
MIP(*LIST).IO = MY-VARIABLE
*END-OF-CMD