HLASM Language Reference
HLASM Language Reference HLASM Language Reference
Data Attributes The following attribute is used for the type attribute of the value of variable symbols: N The value is numeric The following letter is used for symbols or macro instruction operands that cannot be assigned any of the above letters: U Undefined, unknown, or unassigned The common use of the U type attribute is to describe a valid symbol that has not been assigned any of the type attribute values described above. If the assembler is not able to determine what the named symbol represents, it also assigns the U type attribute. Thus, the U type attribute can mean undefined, or unknown, or unassigned at the time of the reference. Consider the following macro definition: Name Operation Operand macro MAC1 &op1,&op2 &A setc T'&op1 &B setc T'&op2 DC C'&A' DC containing type attribute for op1 DC C'&B' DC containing type attribute for op2 mend When the macro MAC1 is called in Figure 90, neither of the operands has previously been defined, however GOOD_SYMBOL is a valid symbol name, whereas ?BAD_SYMBOL? is not a valid symbol name. The type attribute for both operands is U, meaning GOOD_SYMBOL is undefined, and ?BAD_SYMBOL? is unknown. 4 8 a csect 9 mac1 GOOD_SYMBOL,?BAD_SYMBOL? E4 1+ DC C'U' DC containing type attribute for op1 1 E4 11+ DC C'U' DC containing type attribute for op2 12 end Figure 90. Undefined and Unknown Type Attributes When the macro MAC1 is called in Figure 91, GOOD_SYMBOL is a valid symbol name, and has been defined in the DC instruction at statement 12. ?BAD_SYMBOL? is a not valid symbol name, and the assembler issues an error message at statement 13. The type attribute for GOOD_SYMBOL is C, meaning the symbol represents a character constant. The type attribute for ?BAD_SYMBOL? is U, meaning the type is unknown. 6 8 a csect 9 mac1 GOOD_SYMBOL,?BAD_SYMBOL? C3 1+ DC C'C' DC containing type attribute for op1 1 E4 11+ DC C'U' DC containing type attribute for op2 2 A9 12 GOOD_SYMBOL dc cl1'z' 3 A9 13 ?BAD_SYMBOL? dc cl1'z' ASMA147E Symbol too long, or first character not a letter - ?BAD_SYMBOL? 14 end Figure 91. Unknown Type Attribute for Invalid Symbol The type attribute value U, meaning undefined, unknown, or unassigned, is assigned to the following: Ordinary symbols used as labels: 330 HLASM V1R5 Language Reference
Data Attributes – For the LTORG instruction – For the EQU instruction without a third operand – For DC and DS statements that contain variable symbols, for example, U1 DC &X'1' | – That are defined more than once, even though only one instance of the | label is generated due to conditional assembly statements. A | lookahead scan for attributes of a symbol may encounter more than one | occurrence of a symbol, in which case the assembler can't yet tell which | statement(s) will be generated. In such cases, type attribute U is | assigned. At a later time, when the symbol has been generated, its type | attribute is changed to the correct value for the type of statement it | names. Notes: SETC variable symbols that have a value other than a null character string or the name of an instruction that can be referred to be a type attribute reference System variable symbols except: – &SYSDATC, &SYSM_HSEV, &SYSM_SEV, &SYSNDX, &SYSNEST, &SYSOPT_DBCS, &SYSOPT_RENT, &SYSOPT_XOBJECT, and &SYSSTMT, which always have a type attribute value of N – Some other character type system variable symbols which may be assigned a value of a null string, when they have a type attribute value of O Macro instruction operands that specify a literal that is not a duplicate of a literal used in a machine instruction Inner macro instruction operands that are ordinary symbols 1. Ordinary symbols used in the name field of an EQU instruction have the type attribute value U. However, the third operand of an EQU instruction can be used explicitly to assign a type attribute value to the symbol in the name field. 2. The type attribute of a sublist is set to the same value as the type attribute of the first element of the sublist. 3. High Level Assembler and earlier assemblers treat the type attribute differently: Because High Level Assembler allows attribute references to statements generated through substitution, certain cases in which a type attribute of U (undefined, unknown, or unassigned) or M (macro name field) is given under the DOS/VSE Assembler, may give a valid type attribute under High Level Assembler. If the value of the SETC symbol is equal to the name of an instruction that can be referred to by the type attribute, High Level Assembler lets you use the type attribute with a SETC symbol. Because High Level Assembler allows attribute references to literals, certain cases in which a type attribute of U (undefined, unknown, or unassigned) is given by Assembler F and Assembler H for a macro operand that specifies a literal, may give a valid type attribute under High Level Assembler. If the literal specified in the macro instruction operand is a duplicate of a literal specified in open code, or previously generated by conditional assembly processing or macro generation, High Level Chapter 9. How to Write Conditional Assembly Instructions 331
- Page 300 and 301: &SYSM_SEV System Variable Symbol &S
- Page 302 and 303: &SYSNDX System Variable Symbol The
- Page 304 and 305: &SYSOPT_DBCS System Variable Symbol
- Page 306 and 307: &SYSPARM System Variable Symbol Not
- Page 308 and 309: &SYSPRINT_MEMBER System Variable Sy
- Page 310 and 311: &SYSPUNCH_MEMBER System Variable Sy
- Page 312 and 313: &SYSSTEP System Variable Symbol Not
- Page 314 and 315: &SYSTERM_DSN System Variable Symbol
- Page 316 and 317: &SYSTIME System Variable Symbol Not
- Page 318 and 319: Macro Instruction Format sequence_s
- Page 320 and 321: Macro Instruction Format Operand En
- Page 322 and 323: Macro Instruction Format When you n
- Page 324 and 325: Sublists in Operands the order in w
- Page 326 and 327: Sublists in Operands &SYSLIST( n,m)
- Page 328 and 329: Values in Operands Notes: 1. Spaces
- Page 330 and 331: Values in Operands Parentheses In m
- Page 332 and 333: Inner and Outer Macro Instructions
- Page 334 and 335: Levels of Macro Call Nesting When t
- Page 336 and 337: Levels of Macro Call Nesting System
- Page 338 and 339: How to Write Conditional Assembly I
- Page 340 and 341: SET Symbols SET Symbol Specificatio
- Page 342 and 343: SET Symbols Figure 86 (Page 3 of 3)
- Page 344 and 345: Data Attributes this example indica
- Page 346 and 347: Data Attributes variable_symbol is
- Page 348 and 349: Data Attributes The value of an att
- Page 352 and 353: Data Attributes Assembler gives a t
- Page 354 and 355: Data Attributes The scale attribute
- Page 356 and 357: Data Attributes Number Attribute (N
- Page 358 and 359: Data Attributes The operation code
- Page 360 and 361: Lookahead MACRO &NAME MOVE &TO,&FRO
- Page 362 and 363: Open Code Sequence Symbols The cond
- Page 364 and 365: GBLA, GBLB, and GBLC Instructions G
- Page 366 and 367: LCLA, LCLB, and LCLC Instructions s
- Page 368 and 369: SETA Instruction expression is an a
- Page 370 and 371: SETA Instruction | The logical-exp
- Page 372 and 373: SETA Instruction | Figure 99 (Page
- Page 374 and 375: SETA Instruction | The result of C2
- Page 376 and 377: SETA Instruction NOT Format: Logica
- Page 378 and 379: SETA Instruction | X2A Name Operati
- Page 380 and 381: SETA Instruction In evaluating the
- Page 382 and 383: SETB Instruction Any expression tha
- Page 384 and 385: SETB Instruction ┌─────
- Page 386 and 387: SETB Instruction | ISDEC | Format:
- Page 388 and 389: SETB Instruction The two comparands
- Page 390 and 391: SETC Instruction Notes: 1. The asse
- Page 392 and 393: Figure 103. Substring Notation in C
- Page 394 and 395: Loc Object Code Addr1 Addr2 Stmt So
- Page 396 and 397: | B2C('111111') has value '3' | B2C
- Page 398 and 399: | Output: D2B('decstring') converts
Data Attributes<br />
The following attribute is used for the type attribute of the value of variable<br />
symbols:<br />
N<br />
The value is numeric<br />
The following letter is used for symbols or macro instruction operands that cannot<br />
be assigned any of the above letters:<br />
U<br />
Undefined, unknown, or unassigned<br />
The common use of the U type attribute is to describe a valid symbol that has<br />
not been assigned any of the type attribute values described above. If the<br />
assembler is not able to determine what the named symbol represents, it also<br />
assigns the U type attribute. Thus, the U type attribute can mean undefined, or<br />
unknown, or unassigned at the time of the reference. Consider the following<br />
macro definition:<br />
Name Operation Operand<br />
macro<br />
MAC1 &op1,&op2<br />
&A setc T'&op1<br />
&B setc T'&op2<br />
DC C'&A'<br />
DC containing type attribute for op1<br />
DC C'&B'<br />
DC containing type attribute for op2<br />
mend<br />
When the macro MAC1 is called in Figure 90, neither of the operands has<br />
previously been defined, however GOOD_SYMBOL is a valid symbol name, whereas<br />
?BAD_SYMBOL? is not a valid symbol name. The type attribute for both operands<br />
is U, meaning GOOD_SYMBOL is undefined, and ?BAD_SYMBOL? is unknown.<br />
4 8 a csect<br />
9 mac1 GOOD_SYMBOL,?BAD_SYMBOL?<br />
E4 1+ DC C'U' DC containing type attribute for op1<br />
1 E4 11+ DC C'U' DC containing type attribute for op2<br />
12 end<br />
Figure 90. Undefined and Unknown Type Attributes<br />
When the macro MAC1 is called in Figure 91, GOOD_SYMBOL is a valid symbol<br />
name, and has been defined in the DC instruction at statement 12.<br />
?BAD_SYMBOL? is a not valid symbol name, and the assembler issues an error<br />
message at statement 13. The type attribute for GOOD_SYMBOL is C, meaning the<br />
symbol represents a character constant. The type attribute for ?BAD_SYMBOL? is<br />
U, meaning the type is unknown.<br />
6 8 a csect<br />
9 mac1 GOOD_SYMBOL,?BAD_SYMBOL?<br />
C3 1+ DC C'C' DC containing type attribute for op1<br />
1 E4 11+ DC C'U' DC containing type attribute for op2<br />
2 A9 12 GOOD_SYMBOL dc cl1'z'<br />
3 A9<br />
13 ?BAD_SYMBOL? dc cl1'z'<br />
ASMA147E Symbol too long, or first character not a letter - ?BAD_SYMBOL?<br />
14 end<br />
Figure 91. Unknown Type Attribute for Invalid Symbol<br />
The type attribute value U, meaning undefined, unknown, or unassigned, is<br />
assigned to the following:<br />
Ordinary symbols used as labels:<br />
330 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>