Domain: | 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 message text is output in English or German. The default setting is *STD, i.e. the text is output in the language set for the task. The (former) operand values *E for *ENGLISH and *D for *GERMAN are still supported for reasons of compatibility.
INSERT-nn = *NONE / string_expression
Designates the additional content of a message.
MSG-STRUCTURE-OUTPUT =
Specifies whether 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, that no text has been assigned to this message code.
Error messages
|
|
Example
/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 *END-OF-CMD