NET/MASTER Network Control Language (NCL) Reference Manual
VARTABLE ADD
Verbs
106126 Tandem Computers Incorporated 3–189
Considerations
The &SYS.FDBK system variable is set after a VARTABLE ADD statement,
indicating one of the following results:
Return
Code
Description
0 The entry was added successfully.
1 The entry was added successfully. The table was at the limit specified by the
VARTABLE ALLOC, and DELOLD=YES was specified with VARTABLE ALLOC. The
oldest entry was deleted to make room for this entry.
4 An entry with the supplied key value already exists.
12 The supplied key value was longer than the table key length.
16 No table of this name exists in this scope.
24 The table is already at the limit as specified by VARTABLE ALLOC. The entry could
not be added.
The FIELDS=
fieldlist
and VARS=
output-vars-list
parameters allow you
to specify the information you want to store in the new table entry, and the NCL
variables from which the information is to be extracted. You must either specify
both of these parameters or omit both. If specified, the two parameters must have
the same number of entries in their lists.
Changes to a vartable using SCOPE=CACHED are carried out simultaneously in
all processes that contain the vartable as a cached copy. Such changes are applied
to the local cache copy, and also to the global copy. Return to the process is
delayed until the changes have been carried out. If you specify SCOPE=GLOBAL,
any changes are applied only to the global copy of the vartable prior to returning
to the process. Consequently, there may be some delay before the local copy of the
table is updated.
As a result of the updating method for cached copies of global vartables, processes
that update a cached global vartable can be guaranteed a consistent view of that
vartable only if they use SCOPE=CACHED.
For more information on cached vartables, see VARTABLE GET in this section.
For more information on VARTABLE verbs, refer to the NonStop NET/MASTER
NCL Programmer's Guide.
Example
The following example adds or updates an entry in the private vartable called
MYTABLE. The entry obtains a key value of KEY001 and a data content of DATA001:
&K = KEY001
&D = DATA001
VARTABLE ADD ID=MYTABLE KEY=&K FIELDS=DATA1 VARS=&D