HLASM Language Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Extended SET statements

HLASM Language Reference
SC26-4940-06

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.
Read syntax diagramSkip visual syntax diagram
                                         .-,-------.   
                                         V         |   
>>-variable_symbol(subscript)--+-SETA-+----operand-+-----------><
                               +-SETB-+                
                               '-SETC-'                

variable_symbol(subscript)
Is a variable symbol and a subscript that shows the position in the SET symbol array to which the first operand is to be assigned.
operand
Is the arithmetic value, binary value, or character value to be assigned to the corresponding SET symbol array element.
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

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014