NET/MASTER Network Control Language (NCL) Reference Manual

Variables Classified By Function
Variables
9–16 106126 Tandem Computers Incorporated
Variables Classified by
Function
This subsection discusses variables from the perspective of the function they perform.
It includes the following topics:
System variables
Global variables
User variables
Parameters
System Variables System variables provide access to NonStop NET/MASTER MS system-related
information. All system variables are individually listed and defined in Section 5,
“System Variables.”
A system variable begins with the reserved SYS. stem. You cannot create new
variables that begin with the SYS. stem. This stem is reserved for pre-existing
variables that are supplied with NonStop NET/MASTER MS.
The scope of a system variable depends on the particular variable. Some system
variables are visible throughout NonStop NET/MASTER MS: for example,
&SYS.DOMAIN.ID. Some are local to an NCL process: for example, &SYS.NCLID.
Some are local to the current procedure or function: for example,
&SYS.ERROR.RESUMEOK.
System variables cannot be shared between one NCL procedure or function and
another. A reference to an undefined system variable name causes either a
compilation error if %%OPTIONS NODEFER (the default) is in effect, or a run-time
error if %%OPTIONS DEFER is in effect.
You can obtain the value of a system variable from an NCL procedure in the same way
that you can obtain the value of any other variable. Most system variables are
protected from update. Some system variables permit an update.
Table 9-2 lists system variables that you can update. As with other variables, you use
the assignment statement to update these system variables. You cannot use the
ASSIGN verb to assign values to system variables. If you attempt to assign a value to
a defined system variable that is protected from update, you receive a compilation
error if the system variable does not require substitution to resolve its name, or a
run-time error if it does.
Table 9-2. System Variables That You Can Update
Variable Meaning
&SYS.LOOPCTL Returns the current setting of the automatic loop control counter
&SYS.PANEL.FLD Returns the name of the variable associated with the field in error
&SYS.PANEL.SKIP Returns the next panel skip level
&SYS.RETCODE Returns the current system return code or sets a new return code value