NET/MASTER Network Control Language (NCL) Reference Manual

&SYS.ERROR.PROCNAME
System Variables
5–26 106126 Tandem Computers Incorporated
&SYS.ERROR.PROCNAME
The &SYS.ERROR.PROCNAME system variable contains the name of the procedure
that caused an error.
This system variable can be used only in an ON error handler.
&SYS.ERROR.PROCNAME
Consideration
See also &SYS.NCL.CURRPROC, which contains the name of the NCL procedure
currently executing.
Example
In the following example, the procedure name ONPROC—which contains an
arithmetic error— is displayed when the error occurs:
ONPROC: PROCEDURE
ON ERROR DO
WRITE DATA="An error occurred in ",
&SYS.ERROR.PROCNAME
RESUME
END
&A=10
&B=0
&C = &A / &B
END ONPROC