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


Relocatable expression

HLASM Language Reference
SC26-4940-06

A relocatable expression is one whose value changes by n if the origin of the control section in which it appears is relocated n bytes.

A relocatable expression can be a single relocatable term. The assembler reduces a relocatable expression to a single relocatable value if the expression:
  1. Is composed of a single relocatable term, or
  2. Contains relocatable terms, alone or in combination with absolute terms, and
    1. All the relocatable terms but one are paired. The unpaired term gives the expression a relocatable value; the paired relocatable terms and other absolute terms constitute increments or decrements to the value of the unpaired term.
    2. The relocatability attribute of the whole expression is that of the unpaired term.
    3. The sign preceding the unpaired relocatable term must be positive, after all unary operators have resolved.
The following examples show relocatable expressions. A is an absolute term, W and X are relocatable terms with the same relocatability attribute, and Y is a relocatable term with a different relocatability attribute.
Y-32*A                      W-X+*     =F'1234' (literal)
* (reference to             W-X+W     Y
  location counter)         W-X+Y     A*A+W-W+Y

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014