Prints error messages stored in the ERRMSG file or in a user-specified file.
PRINTERR error-expr {FROM file-var}
error-exp An expression that evaluates to the item-id of the error message.
error-exp can also contain a list of parameters to be included in the error message; each parameter replaces an A, A(n) or R(n) message format code in the error message item. The parameters must be separated from the item-id and each other by system delimiters (attribute marks, value marks or subvalue marks, but not segment marks).
file-varThe name of the variable to which the error file was assigned using an OPEN statement. If omitted, the system ERRMSG file is used.
The PRINTERR statement allows you to print error messages without exiting the program.
Error message libraries can be kept separate from the ERRMSG file and used by the PRINTERR statement with the FROM clause.
OPEN "MYERRS" TO ERRORFILE ELSE STOP 201,"MYERRS" . . X = "511":@VM:PARAMETER PRINTERR X FROM ERRORFILE
Prints error message 511 found in the user-specified file ERRORFILE. @VM is a predefined symbol that evaluates to a value mark. PARAMETER evaluates to a text string that will be printed as part of the error message.
PRINTERR "201":@AM:"TESTFILE"
Prints message [201]'TESTFILE' IS NOT A FILE NAME
found in
the ERRMSG file. @AM is a
predefined symbol that
evaluates to an attribute mark.