WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall ERTXT(error, message, [len][, position])
The number or mnemonic of the error for which you’re requesting an error message. (n)
The variable that will be loaded with the error message, stored left-justified over blanks. (a)
(optional) The length of the message text. (n)
(optional) Returned with the position of the message text, after the facility, severity, and mnemonic. (n)
The ERTXT subroutine enables your program to report trappable errors accurately to the person running the program. It returns a descriptive error message that corresponds to the specified error code.
The message can have up to 45 characters. If the variable is too short to hold the message, only the leftmost portion of the message is stored.
If the specified error number is undefined, the ERTXT subroutine returns the error text from $ERR_UNDFERR (“Undefined error”).
ERTXT is functionally identical to DBL$ERRTXT.
On OpenVMS, if system option #35 is set, the returned message includes the facility, severity, and mnemonic, and the position argument is loaded with the starting position of the message text. Otherwise, if option #35 is not set, the text does not include the facility, severity, or mnemonic, and the position argument has a value of 1.
The following subroutine displays the most recent Synergy DBL error number, text, and line number.
subroutine proc_error .define TTCHN ,1 record msg ,a45 proc xcall ertxt(%error, msg) writes(TTCHN, "Error#" + %string(%error) + ": " + msg + & " at line " + %string(%erlin)) return endsubroutine