NET/MASTER Network Control Language (NCL) Reference Manual

Variables Classified By Function
Variables
106126 Tandem Computers Incorporated 9–17
The following example assigns a value to the &SYS.RETCODE system variable:
&SYS.RETCODE = 55
Global Variables A global variable begins with GLBL. Global variables are stored in global memory
and are visible throughout NonStop NET/MASTER MS. They can be accessed by any
NCL process and used for communication between NCL processes.
Any type of variable can be a global variable because any type of variable can begin
with GLBL. The following are examples of global variables:
Variable Name Variable Type
&GLBLXYZ Global simple variable
&GLBL&X&Y&Z Global complex variable
&GLBL. Global stem variable
&GLBLXYZ. Global stem variable
&GLBLABC.X.99.Z Global compound variable
&(GLBLXYZ) Nested global variable
Global variables are created and deleted using assignment statement. Global variables
cannot:
Be shared
Have panel attributes
Be used as the input field of a panel
Note It is recommended that you restrict your use of global variables. Excessive use of global variables can
impede the performance of NonStop NET/MASTER MS.
User Variables A user variable is any variable created by an NCL procedure or function. It can hold a
value of any type: string or numeric. It exists either for the duration of the procedure
or function, or for the duration of the NCL process in which the procedure or function
belongs. User variables are local to the procedure or function they are in. They can be
shared with other procedures or functions.
A user variable is automatically created when a value is assigned to a variable and the
variable does not exist. It is created from an explicit assignment statement, by the
ASSIGN verb, or when a new variable is referred to in any other NCL statement.
You can delete a user variable within a procedure or function by assigning a null value
to it. If you refer to a user variable that does not exist, NCL returns a null value.
Parameter Variables A parameter variable, or parameter, is a special type of user variable. Parameters are
user variables from &1 through &
n
, in which
n
is a positive integer. They are created
by NCL to hold parameters passed to a procedure when a procedure is called.