Previous Topic: Complex Variables in Assignment Statements

Next Topic: Implicit Assignment: Using Other NCL Verbs

Implicit Assignment: Using &ASSIGN

The &ASSIGN statement, which is an NCL verb, is used to assign values to multiple target variables in one operation. It is common for procedures to operate with groups of related variables and to have the need to manipulate the values of all the variables in a group.

Using explicit assignment statements to change the values of all the variables in a group is less efficient than using the &ASSIGN statement.

&ASSIGN lets you define named or generic groups of source variables, and transfer source variable contents to corresponding target variables, also named specifically or generically. Similarly, groups of target variables can be assigned null values and deleted in a single operation.