Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Length attribute (L') HLASM Language Reference SC26-4940-06 |
|
The length attribute has a numeric value equal to the number of bytes occupied by the data that is named by the symbol specified in the attribute reference. Evaluation of length attribute references for conditional assembly statements is handled differently from references in ordinary assembly. In conditional assembly statements, the operand of a length attribute reference must be either an ordinary symbol whose length attribute is either known, or can be determined in lookahead mode (Figure 1); or it must be a variable symbol whose value is that of an ordinary symbol satisfying the same rules. In ordinary assembly statements, the operand of a length attribute reference can be a character-valued conditional assembly expression whose value is that of an ordinary symbol. Here is an example to clarify this distinction:
The two SETB statements receive different diagnostic messages, because the errors are detected during different parts of the assembler's analysis of the SETB expressions. In conditional assembly statements, the operand of a length attribute reference must be an ordinary or variable symbol, and not a character expression. The length attribute can also be specified outside conditional assembly instructions. Then, the length attribute value is not available for conditional assembly processing, but is used as a value at assembly time. Figure 1 is an example showing
the evaluation of the length attribute for an assembler instruction
in statement 1 and for a conditional assembly instruction in statement
8.
Figure 1. Evaluation
of length attribute references
In statement 2 the length of CSYM has not been established because the definition of CSYM in statement 1 is not complete. The reference to the length attribute results in a length of 1 and error message ASMA042E. However, statement 5 shows that the type attribute is assigned, and statement 7 shows that the defined attribute is assigned. In comparison, the length attribute for symbol CSYM2 is available immediately, as it was retrieved indirectly using the conditional assembly instruction in statement 8. During conditional assembly, an ordinary symbol used in the name field
of an EQU instruction has a length attribute value that depends on
the order of the symbol's definition and the reference to its length
attribute.
Notes:
|
Copyright IBM Corporation 1990, 2014
|