$FORMATMSG (set a message format)
$FORMATMSG sets the format of a character string that is output to a message.
Syntax
message=$FORMATMSG(message-text,character-string-1(,character-string-2(,...)))
Values
-
message
Specifies a message, expressed as a variable.
-
message-text
Specifies the character string whose format is to be set, as either a constant or a variable. A constant must be enclosed in single quotation marks ('').
-
character-string
Specifies the character string to be inserted in the message text, as either a constant or a variable. A constant must be enclosed in single quotation marks ('').
A maximum of 99 character strings can be specified.
Status
The following table lists and describes the possible statuses:
Status |
Description |
---|---|
NORMAL |
Normal end |
ERROR |
— |
Script execution interrupted |
Indicates one of the following:
|
Example
This example outputs a message with the asset number and the processing inserted:
MSG = $FORMATMSG('Device %2 on asset number %1 failed','1001','deletion') $ECHO(MSG)
- Execution result:
-
Device deletion on asset number 1001 failed.