NET/MASTER Network Control Language (NCL) Reference Manual

&SYS.ERROR.COLUMN
System Variables
106126 Tandem Computers Incorporated 5–19
&SYS.ERROR.COLUMN
The &SYS.ERROR.COLUMN system variable contains the column in a line of code in
which an error occurred. If the error occurs in a continued line, the value of this
variable is the column number in the continued line.
The value of &SYS.ERROR.COLUMN is only an approximate indication of the
position of the error. For example, a statement may fail because a previously defined
variable was outside an expected range. In this case, the value of
&SYS.ERROR.COLUMN would be the position of the statement that failed, and not of
the variable that is in error.
This system variable can be used only in an ON error handler.
&SYS.ERROR.COLUMN
Consideration
See also &SYS.ERROR.LINE, which contains the TEDIT line number in the source file
at which the error occurred.
Example
In the following example, the procedure named ONPROC divides the variable &A by
0, which causes an error. The error handler (starting with the ON statement) is
executed and displays the line number and the column number in which the error
occurred:
ONPROC: PROCEDURE
ON ERROR DO
WRITE DATA="An error occurred in column ",
&SYS.ERROR.COLUMN,
"of line" &SYS.ERROR.LINE
RESUME
END
&A=10
&B=0
&C = &A / &B
END ONPROC