Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Subscripted SETC symbols HLASM Language Reference SC26-4940-06 |
|
The SETC symbol (see 1 in Figure 1) in the name field can be subscripted. If the same SETC symbol has not been previously declared in a GBLC or LCLC instruction with an allowable dimension (see 2 in Figure 1), or has been implicitly declared in a SETC instruction as a scalar (unscripted) variable symbol, then the symbol is implicitly declared as a local SETC array variable. The assembler assigns the character value represented in the operand
field to the position in the declared array (see 3 in Figure 1) given by the value of the subscript.
The subscript expression must not be 0 or have a negative value.
Figure 1. Subscripted SETC symbols
LCLC &C1,&C2 LCLC &SUBSCRC(20) &D(4) SETC 'XYZ' . ∧ ┌─── 1 . └─── 2 V . &SUBSCRC(10) SETC 'ABCDE' . │ . │ . │ ────────────────────────┼────────────────────────────────────────────── 3 ─────┐ &SUBSCRC Array: │ V ┌─────┬─────┬─────┬────/ /────┬─────┬─────┬─────┬────/ /────┬─────┐ │ │ │ │ │ABCDE│ │ │ │ │ └─────┴─────┴─────┴────/ /────┴─────┴─────┴─────┴────/ /────┴─────┘∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ 1 2 3 4 10 11 12 13 20 |
Copyright IBM Corporation 1990, 2014
|