11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SET symbolspreceding 999999 elements to be allocated. You can determine the maximumsubscript using the N’ attribute (see “Number attribute (N')” on page 332).The subscript can be a subscripted SET symbol.Created SET symbolsThe assembler can create SET symbols during conditional assembly processingfrom other variable symbols and character strings. A SET symbol thus created hasthe form &(e), where e represents one or more of these:v Variable symbols, optionally subscriptedv Strings of alphanumeric charactersv Other created SET symbolsAfter substitution and concatenation, e must consist of a string of up to 62alphanumeric characters, the first of which is alphabetic. The assembler considersthe preceding ampersand and this string as the name of a SET variable. If thiscreated SET symbol has the same name as an existing SET symbol, they are treatedas identical. If this created SET symbol does not have the name of any existing SETsymbol, the usual rules for assigning type and scope apply.You can use created SET symbols wherever ordinary SET symbols are permitted,including declarations. A created SET symbol may not match the name of a systemvariable symbol, nor the name of a symbolic parameter in a macro prototypestatement. You can also nest created SET symbols in other created SET symbols.Consider the following example:&ABC(1) SETC ’MKT’,’27’,’$5’Let &(e) equal &(&ABC(&I)QUA&I).&I &ABC(&I) Created SET Symbol Comment1 MKT &MKTQUA1 Valid2 27 &27QUA2 Invalid: character after ’&’ not alphabetic3 $5 &$5QUA3 Valid4 &QUA4 ValidThe name of a created SET symbol cannot match the name of a system variablesymbol or of a symbolic parameter in a macro definition.The created SET symbol can be thought of as a form of indirect addressing. Withnested created SET symbols, you can perform this kind of indirect addressing toany level.In another sense, created SET symbols offer an associative storage facility. Forexample, a symbol table of numeric attributes can be referred to by an expressionof the form &(&SYM)(&I) to yield the Ith attribute of the symbol name in &SYM. Asthis example indicates, created SET symbols may be declared and used as arrays ofdimensioned variables.Created SET symbols also enable you to achieve some of the effect ofmultiple-dimensioned arrays by creating a separate name for each element of thearray. For example, a 3-dimensional array of the form &X(&I,&J,&K) could beaddressed as &(X&I.$&J.$&K), where &I, &J, and &K would typically have numericvalues. Thus, &X(2,3,4) would be represented by &X2$3$4. The $ separatorsguarantee that &X(2,33,55) and &X(23,35,5) are unique:320 <strong>HLASM</strong>: <strong>V1R6</strong> <strong>Language</strong> <strong>Ref</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!