Displays the specified error message.
ERRMSG errcode [,val1[,val2]]
||An expression that resolves to a MultiValue error code; commonly (but not always) specified as a positive integer. The error code can be specified as a literal or as a expression that resolves to a literal value. A non-numeric literal value must be specified as a quoted string.
||Optional A comma-separated list of one or argument values inserted into the error message text. These argument values can be specified as literals or as expressions that resolve to literals. A non-numeric literal value must be specified as a quoted string.
displays the error message text corresponding to the errcode
error code. Error messages are defined in the ERRMSG file. An error message text commonly includes the error code (in square brackets) as part of the message.
If you specify a errcode
value that does not correspond to an error code, ERRMSG
displays the string Errmsg with the error code in square brackets.
If you specify one or more val
displays the errcode
error message text with these val
arguments inserted in the message. If the errcode
error message does not take an inserted value, the val
argument is ignored. If the errcode
value does not correspond to an error code, ERRMSG
returns the Errmsg string with val
appended and followed by a caret (^) separator character.
The following examples return an error message that does not take a supplied value:
The following examples return an error message that takes one supplied value:
 Program '' has not been compiled.
 Program '24' has not been compiled.
 Program 'test1' has not been compiled.
The following examples specify a num
value that does not correspond to an error code: