NET/MASTER Network Control Language (NCL) Reference Manual

5 System Variables
106126 Tandem Computers Incorporated 5–1
A system variable contains read-only information that is available to all NCL
procedures in the system. This information may either be constant (for example,
&SYS.TIME always contains the current time) or procedure-dependent (for example,
&SYS.RETCODE returns a value dependent on the result of a verb operation).
A system variable is indicated by the &SYS. prefix. For system variables in NCL
procedures, this prefix must be included.
This section describes the general-purpose system variables that are available to all
NCL procedures. The description of each system variable contains:
A brief overview of what the system variable does.
A diagram showing the syntax of the system variable.
Considerations that affect the use of the system variable.
A list of related system variables, verbs, or other NCL statements.
At least one example for each system variable. Null strings are indicated in
examples by two single quote characters together (‘’). For those examples that do
not consist of complete procedures, the relevant system variable is shown as the
object of a SAY or an IF core statement. This NCL statement can then be
conveniently included in a procedure of your own choice. Certain panel type
variables assume that a valid panel exists and has been displayed.
There are system variables that contain standard input and output field attributes used
during panel processing, see Section 6, “Panel Control Statements.”
There are also suites of special system variables that occur only on completion of
certain verbs; these variables are documented in Section 7, “Message Profile
Variables.”
It is important to note that system variables that begin with &SYS.ERROR. can be used
only in an ON error handler. For examples of error handlers, refer to the NonStop
NET/MASTER NCL Programmer’s Guide.
System variables that begin with &SYS.ERROR. are provided to assist the user in
obtaining more information about the types of errors that can occur during the
execution of an NCL process. These variables are set internally within NCL whenever
it discovers a run-time error. If the user does not try to trap (intercept) and investigate
the error, NCL terminates the NCL process and issues a message indicating the type of
error and the line number in the source file at which the error occurred.
For more information on error handlers, see the ON core statement in Section 2, “Core
Statements.” For a correlation between the NCL error codes and the system-defined
error condition names, see Table 2-3, also in Section 2.