NET/MASTER Network Control Language (NCL) Reference Manual
VARTABLE GET
Verbs
106126 Tandem Computers Incorporated 3–207
The following example shows the use of VARTABLE GET with SCOPE=CACHED to
obtain a local copy of a global vartable. This example allocates a global vartable called
GTABLE. The process then adds two entries in the same vartable and specifies the
vartable as a local cached table. Both the local cached vartable and the global vartable
are updated at the same time. The entry uses a key value of KEY01 and adds two data
items of DATA01 and DATA02; the VARTABLE GET verb is issued to establish a
cached copy of the global vartable named GTABLE in this process. Without the
VARTABLE GET, only the global vartable is updated because a cached copy does not
exist; SCOPE=CACHED is interpreted as SCOPE=GLOBAL.
VARTBL1: PROCEDURE
&K = KEY01
&A = DATA01
&B = DATA02
VARTABLE ALLOC ID=GTABLE SCOPE=GLOBAL KEYLEN=5,
DATA=10 LIMIT=10
VARTABLE GET ID=GTABLE SCOPE=CACHED KEY=&K
VARTABLE ADD ID=MYTABLE SCOPE=CACHED KEY=&K FIELDS=DATA1,
VARS=&D
END VARTBL1