NET/MASTER Network Control Language (NCL) Programmer's Guide
The ASSIGN and DROP Verbs
Working With Mapping Services
106160 Tandem Computers Incorporated 10–33
Deleting an MDO Variable
You can delete an MDO variable in two ways: using the DROP verb or using the
ASSIGN verb. The following example of the DROP verb deletes an MDO variable:
DROP VARS=&abc.
The following syntax of the ASSIGN verb deletes an MDO variable:
ASSIGN [ OPT=VALUE ] MDO=
variable-name
The following example produces the same result as the preceding example:
ASSIGN OPT=VALUE MDO=&abc.
Deleting an MDO variable using these verbs does not assign a null value to the
variable stem—it deletes the variable name and the names of all variables that begin
with the stem name from memory.
The following NCL procedure uses the ASSIGN verb to create an MDO variable,
&ABC., that is interpreted by the map $MSG:
zex1012n: PROCEDURE
/* Creates an MDO variable using ASSIGN */
SAY Creating an MDO variable with map $MSG
ASSIGN MDO=&abc. OPT=VALUE MAP=$MSG
SAY Creating fields in the MDO variable
&abc.text = "A test message"
&abc.msgattr.display.color = RED
&abc.msgattr.display.hlite = NONE
&abc.msgattr.display.intens = NORMAL
SAY Displaying fields in the MDO variable
SAY "Text is "&abc.text
SAY "Color is "&abc.msgattr.display.color
SAY "Hlite is "&abc.msgattr.display.hlite
SAY "Intens is "&abc.msgattr.display.intens
SAY Deleting an MDO variable
DROP VARS=&abc.
SAY &abc.
SAY Attempting to display MDO variable
SAY "Text is "&abc.text
SAY "Color is "&abc.msgattr.display.color
SAY "Hlite is "&abc.msgattr.display.hlite
SAY "Intens is "&abc.msgattr.display.intens
END zex1012n
The NCL procedure creates a series of compound variables under the stem &ABC. and
displays their contents. It then uses the DROP verb to delete &ABC..