As well as assigning single values to SET symbols, you can assign values to multiple elements in an array of a subscripted SET symbol with one single SETx instruction. Such an instruction is called an extended SET statement.
|
The first operand is assigned to the SET symbol denoted by variable_symbol(subscript). Successive operands are then assigned to successive positions in the SET symbol array. If an operand is omitted, the corresponding element of the array is unchanged. Consider the following example:
LCLA &LIST(50) &LIST(3) SETA 5,10,,20,25,30
The first instruction declares &LIST as a subscripted local SETA symbol. The second instruction assigns values to certain elements of the array &LIST. Thus, the instruction does the same as the following sequence:
&LIST(3) SETA 5 &LIST(4) SETA 10 &LIST(6) SETA 20 &LIST(7) SETA 25 &LIST(8) SETA 30
You can use the alternative statement format for extended SETx statements. The above coding could then be written as follows:
&LIST(3) SETA 5, THIS IS X
10,, AN ARRAY X
20,25,30 SPECIFICATION
[ Top of Page | Previous Page | Next Page | Contents | Index ]