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


Expressions

HLASM Language Reference
SC26-4940-06

This section discusses the expressions used in coding operand entries for source statements. You can use an expression to specify:
  • An address
  • An explicit length
  • A modifier
  • A duplication factor
  • A complete operand

Expressions have absolute and relocatable values. Whether an expression is absolute or relocatable depends on the value of the terms it contains. The assembler evaluates relocatable and absolute expressions at assembly time. Figure 1 shows examples of valid expressions.

In addition to expressions used in coding operand entries, there are three types of expression that you can use only in conditional assembly instructions: arithmetic, logical, and character expressions. They are evaluated during conditional assembly. For more information, see Assigning values to SET symbols.

An expression is composed of a single term or an arithmetic combination of terms. The assembler reduces multiterm expressions to single values. Thus, you do not have to compute these values yourself. Here are examples of valid expressions:
Figure 1. Examples of valid expressions
*                                     BETA*10
AREA1+X'2D'                           B'101'
*+32                                  C'ABC'
N-25                                  29
FIELD+332                             L'FIELD
FIELD                                 LAMBDA+GAMMA
(EXIT-ENTRY+1)+GO                     TEN/TWO
ALPHA-BETA/(10+AREA*L'FIELD)-100      =F'1234'
=A(100,133,175,221)+8

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014