NET/MASTER Network Control Language (NCL) Reference Manual
Specifying a Range of Variables Using ARGS
Verb Syntax and Variable Access Methods
11–18 106126 Tandem Computers Incorporated
Some examples of verbs that permit generic variable specifications are: ASSIGN and
DROP. Here are some examples:
ASSIGN VARS &* GENERIC
ASSIGN VARS=&A * GENERIC FROM VARS=&B*
DROP VARS &TOTAL.* GENERIC
DROP VARS &GLBL* GENERIC
Note the difference between a generic variable specification and a ranged variable
specification. The syntax of the variable specification is the same in both cases. The
variable name, if provided, must be followed by an asterisk (*). But a generic variable
specification includes the GENERIC keyword. Without the GENERIC keyword, the
variable specification results in a range of variables.
Specifying a Range of
Variables Using ARGS
This subsection discusses how to specify a range of variables with the ARGS keyword.
The ARGS keyword is similar in function to VARS lists. ARGS is identical to
VARS=&*. Depending on the verb, you can specify the RANGE keyword after ARGS.
The ARGS and VARS keywords are mutually exclusive. (VARS lists are discussed in
“Variable Lists Beginning With VARS” earlier in this section.) Here is the complete
syntax of the ARGS keyword:
ARGS [ RANGE [ = ] (
start2
,
end2
) ]
Note An important efficiency consideration: if you know the number of variables you need, then specify the
exact number with the RANGE keyword. This saves NCL deleting the excess variables.
The syntax of the RANGE keyword after ARGS is identical to the syntax of the
RANGE keyword in a VARS list. See “Specifying a Range of Variables” earlier in this
section for details.
Some examples of verbs that use ARGS are: ASSIGN, DROP, EMSREAD, FILE ADD,
FILE GET, FILE PUT, FILE PUTGET, INTREAD, LOGREAD, MSGREAD, PARSE,
PAUSE, and SECCALL.
Here are some examples:
What You Type Meaning
DROP ARGS RANGE=(5,6) Deletes &5 and &6.
DROP ARGS RANGE=(10,15) Deletes &10 through &15.
FILE PUT ARGS Generates &1 through &64 and uses &1 through &
n
,
where
n
is the number of variables required.
PARSE ARGS DATA My message Generates &1 through &64 and uses &1 and &2.