NET/MASTER Network Control Language (NCL) Reference Manual
Multiple Variable Assignment Using ASSIGN
Verb Syntax and Variable Access Methods
11–24 106126 Tandem Computers Incorporated
Using MERGE
The MERGE keyword does not affect target variables, whether they match source
variables or not. It creates a variable if there are no target variables with a suffix that
matches that of a source variable. This is the opposite operation to that performed by
the BYNAME keyword. Here is an example:
ASSIGN VARS=&A* MERGE FROM VARS=&B*
Target Variables Source Variables Result of MERGE Comment
&A1 = NN &B1 = 000 &A1 = NN &A1 not affected
&A2 = CC ++ &A2 = CC &A2 not affected
** &BB = 999 &AB = 999 &AB created
** &BC = 888 &AC = 888 &AC created
&AD = LL &BD = 777 &AD = LL &AD not affected
&AE = PP ++ &AE = PP &AE not affected
&AF = GG ++ &AF = GG &AF not affected
** &BZ = 555 &AZ = 555 &AZ created
** indicates a nonexistent target variable.
++ indicates a nonexistent source variable.
Using BYNAME
The BYNAME keyword updates all target variables that have suffixes that match
source variable suffixes. It leaves other target variables unchanged. This is the
opposite operation from that performed by the MERGE keyword. Here is an example:
ASSIGN VARS=&A* BYNAME FROM VARS=&B*
Target Variables Source Variables Result of BYNAME Comment
&A1 = NN &B1 = 000 &A1 = 000 &A1 updated
&A2 = CC ++ &A2 = CC &A2 not affected
** &BB = 999 *+ No change
** &BC = 888 *+ No change
&AD = LL &BD = 777 &AD = 777 &AD updated
&AE = PP ++ &AE = PP &AE not affected
&AF = GG ++ &AF = GG &AF not affected
** &BZ = 555 *+ No change
** indicates a nonexistent target variable.
++ indicates a nonexistent source variable.
*+ indicates that the result is defined in the comment