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


Previously defined symbols

HLASM Language Reference
SC26-4940-06

An ordinary symbol is previously defined if the statement that defines it is processed before the statement in which the symbol appears in an operand.

An ordinary symbol must be defined by the time the END statement is reached, however, it need not be previously defined when it is used as follows:
  • In operand expressions of certain instructions such as CNOP instructions and some ORG instructions
  • In modifier expressions of DC, DS, and DXD instructions
  • In the first operand of an EQU instruction
  • In Q-type constants
When using the forward-reference capability of the assembler, avoid the following types of errors:
  • Circular definition of symbols, such as:
    X        EQU             Y
    Y        EQU             X
  • Circular location-counter dependency, as in this example:
    A        DS              (B-A)C
    B        LR              1,2

    The first statement in this example cannot be resolved because the value of the duplication factor is dependent on the location of B, which is, in turn, dependent upon the length and duplication factor of A.

Literals can contain symbolic expressions in modifiers, but any ordinary symbols used must have been previously defined.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014