NET/MASTER Network Control Language (NCL) Reference Manual
&SYS.ERROR.STMT_NAME
System Variables
5–30 106126 Tandem Computers Incorporated
&SYS.ERROR.STMT_NAME
The &SYS.ERROR.STMT_NAME system variable contains the name of the statement
that caused the error. If the assignment statement is in error,
&SYS.ERROR.STMT_NAME contains an equal sign (=).
This system variable can be used only in an ON error handler.
&SYS.ERROR.STMT_NAME
Consideration
See also the other &SYS.ERROR system variables.
Example
The following procedure named ONPROC contains an error. The error handler
displays information that can help you find the error:
ONPROC: PROCEDURE
ON ERROR DO
 WRITE DATA="AN ERROR OCCURRED IN KEYWORD",
 &SYS.ERROR.KEYWORD,
 "of STATEMENT" &SYS.ERROR.STMT_NAME,
 "AT POSITION " &SYS.ERROR.STMT,
 "IN LINE " &SYS.ERROR.LINE
 RESUME
END
&COL=OOPS
WRITE COLOR=&COL DATA="THIS IS TEST TEXT"
END ONPROC
The previous procedure displays:
&SYS.ERROR.KEYWORD, which contains the incorrect keyword. In the previous
example, it is the color option (&COL variable).
&SYS.ERROR.STMT_NAME, which contains the incorrect statement (the WRITE
statement).
&SYS.ERROR.STMT, which contains the statement number within the line that
contains the error.
&SYS.ERROR.LINE, which contains the TEDIT line number in the source file that
contains the error.










