NET/MASTER Network Control Language (NCL) Reference Manual
Multiple Variable Assignment Using ASSIGN
Verb Syntax and Variable Access Methods
11–20 106126 Tandem Computers Incorporated
ASSIGN ARGS DATA="Constant value"
The results are:
&1 = “Constant value”
…
&64 = “Constant value”
If you omit both the DATA and FROM keywords, no source data is provided on the
DATA keyword, or no source data exists; the target variables are then assigned a null
value. The following example assigns a null value to &1 through &64:
ASSIGN ARGS
The following example assigns a null value to &NAME, &USER, and &PHONE:
ASSIGN VARS=(&NAME1,&USER,&PHONE) DATA=
Assigning Values From
One Range to Another
The next main use of the ASSIGN verb is to transfer the values of a range of variables
to another range of variables. The following example transfers the contents of a fixed
range of source variables to a fixed range of target variables.
ASSIGN VARS=(&A*(1,5)) FROM VARS=(&B*(6,10))
The results are:
Value of &B6 assigned to &A1
Value of &B7 assigned to &A2
Value of &B8 assigned to &A3
Value of &B9 assigned to &A4
Value of &B10 assigned to &A5
The following example transfers the contents of a default range of parameters to a
default range of target variables. In this example, the values of &A65 onward are
unchanged.
ASSIGN VARS=&A* FROM ARGS
The results are:
Value of &1 assigned to &A1
…
Value of &64 assigned to &A64