NET/MASTER Network Control Language (NCL) Reference Manual
Using PARSE and SEGMENT
Verb Syntax and Variable Access Methods
106126 Tandem Computers Incorporated 11–25
Deleting Variables
Using DROP
You can use the DROP verb to delete multiple variables. The target variables that
DROP deletes are specified by the VARS, ARGS, RANGE, and GENERIC keywords
discussed earlier in this section.
You can use DROP to delete any variables with panel attributes set, as well as MDO
variables. DROP does not simply assign a null value to variables. It completely
removes them from the name space that NCL allocates to store variables.
You cannot use DROP to delete system variables: that is, variables that begin with the
reserved SYS. stem. You can use DROP to delete global variables.
The following example deletes &1 through &64:
DROP ARGS
The following example deletes all variables &A
n
and &B
n
(
n
is in the range 1 to 64):
DROP VARS=(&A*,&B*)
In the previous example, if you add the operand GENERIC, all &A
n
and &B
n
variables would be deleted, including variables with nonnumeric suffixes, thus:
DROP VARS=(&A*,&B*) GENERIC
The following example specifies a range of variables. DROP deletes &A100 through
&A105 and all variables beginning with &B from &B1 through to the value of
&MAXVARS:
DROP VARS=(&A*(100,105),&B*) RANGE=(1,&MAXVARS)
Using PARSE and
SEGMENT
This subsection discusses how to use the PARSE keyword to parse a message as it is
read into variables. It discusses how to use the SEGMENT keyword to specify the
length of the data to be placed into a variable as it is being parsed. Finally, it discusses
the PARSE verb that provides additional techniques to delimit messages.
Using the PARSE
Keywords
The PARSE keyword is used by verbs that read messages such as EMSREAD,
INTREAD, LOGREAD, and MSGREAD. The setting of the PARSE keyword in these
verbs specifies how these verbs delimit a message by words or by bytes.
If you specify PARSE=YES (default), NCL delimits a message with blanks. It splits a
message into words. If you specify PARSE=NO, NCL delimits a message using byte
boundaries. The following example delimits the message This is a message:
INTREAD ARGS PARSE=YES
The results are:
&1 = This
&2 = is
&3 = a
&4 = message