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


Subscripted SET symbol specification

HLASM Language Reference
SC26-4940-06

Here is the format of a subscripted SET symbol:
Read syntax diagramSkip visual syntax diagram
>>-&symbol(subscript)------------------------------------------><

&symbol
Is a variable symbol.
subscript
Is an arithmetic expression with a value greater than or equal to 1.
Example:
&ARRAY(20)

The subscript can be any arithmetic expression allowed in the operand field of a SETA instruction (see Arithmetic (SETA) expressions).

The subscript refers to one of the many positions in an array of values identified by the SET symbol.

A subscripted SET symbol can be used anywhere an unsubscripted SET symbol is allowed. However, subscripted SET symbols must be declared as subscripted by a previous local or global declaration instruction, or implicitly as a local subscripted SET symbol in a SETx instruction of the desired type.

The dimension (the maximum value of the subscript) of a subscripted SET symbol is not determined by the explicit or implicit declaration of the symbol. The dimension specified can be exceeded in later SETx instructions. Note, however, that increasing the dimension of a subscripted SET symbol also increases the storage required. For example, referencing only &ARRAY(1000000) still causes the preceding 999999 elements to be allocated. You can determine the maximum subscript using the N' attribute (see Number attribute (N')).

The subscript can be a subscripted SET symbol.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014