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


Summary of constants

HLASM Language Reference
SC26-4940-06

Table 1 and Table 2 summarize the types of assembler constants.

Table 1. Summary of constants (part 1 of 2)
Constant Type Implicit Length (Bytes) Alignment Length Modifier Range Specified By
Address A 4 Fullword .1 to 4¹ Any expression
Doubleword Address AD 8 Doubleword .1 to 8¹ Any expression
Binary B As needed Byte .1 to 256 Binary digits
Character C As needed Byte .1 to 256² Characters
ASCII Character CA As needed Byte .1 to 256² Characters
Unicode Character CU As needed Byte 2 to 256³ Characters
Floating Point Hex D 8 Doubleword .1 to 8 Decimal digits
Floating Point Hex DH 8 Doubleword .12 to 8 Decimal digits
Floating Point Binary DB 8 Doubleword .12 to 8 Decimal digits
Floating Point Decimal DD 8 Doubleword 8 Decimal digits
Floating Point Hex E 4 Fullword .1 to 8 Decimal digits
Floating Point Hex EH 4 Fullword .12 to 8 Decimal digits
Floating Point Binary EB 4 Fullword .9 to 8 Decimal digits
Floating Point Decimal ED 4 Fullword 4 Decimal digits
Fixed Point F 4 Fullword .1 to 8 Decimal digits
Doubleword Fixed Point FD 8 Doubleword .1 to 8 Decimal digits
Graphic (DBCS) G As needed Byte 2 to 256³ DBCS characters
Fixed Point H 2 Halfword .1 to 8 Decimal digits
Length J 4 Fullword 1 to 4 Class name or external DSECT name⁴
Floating Point Hex L 16 Doubleword .1 to 16 Decimal digits
Floating Point Hex LH 16 Doubleword .12 to 16 Decimal digits
Floating Point Binary LB 16 Doubleword .16 to 16 Decimal digits
Floating Point Decimal LD 16 Doubleword 16 Decimal digits
Floating Point Hex LQ 16 Quadword .1 to 16 Decimal digits
Decimal P As needed Byte .1 to 16 Decimal digits
Offset

Q
QY⁴

4
3

Fullword
Halfword

1 to 4
3 only

Symbol naming a DXD, DSECT, or part
Address R⁴ 4 Fullword 3, 4 Symbol
Address

S
SY

2
3

Halfword
Halfword

2 only
3 only

One absolute or relocatable expression, or two absolute expressions: exp(exp)
Address V 4 Fullword 3, 4 Relocatable symbol
Hexadecimal X As needed Byte .1 to 256² Hex digits
Address Y 2 Halfword .1 to 2¹ Any expression
Decimal Z As needed Byte .1 to 16 Decimal digits
Notes:
  1. Bit length specification permitted with absolute expressions only; relocatable A-type constants, 2, 3, or 4 bytes only; relocatable Y-type constants, 2 bytes only.
  2. In a DS assembler instruction, C-and-X type constants can have length specification to 65535.
  3. The length modifier must be a multiple of 2, and can be up to 65534 in a DS assembler instruction.
  4. GOFF only.
Table 2. Summary of constants (part 2 of 2)
Constant Type No. of Constants per Operand Range for Exponents Range for Scale Truncation or Padding Side
Address A Multiple     Left
Binary B Multiple     Left
Character C One     Right
ASCII Character CA One     Right
Unicode Character CU One     Right
Floating Point Hex D Multiple -85 to +75 0 to 13 Right¹
Floating Point Hex DH Multiple -231 to 231-1 0 to 13 Right¹
Floating Point Binary DB Multiple -231 to 231-1 N/A Right¹
Floating Point Decimal DD Multiple -231 to 231-1 N/A  
Floating Point Hex E Multiple -85 to +75 0 to 5 Right¹
Floating Point Hex EH Multiple -231 to 231-1 0 to 5 Right¹
Floating Point Binary EB Multiple -231 to 231-1 N/A Right¹
Floating Point Decimal ED Multiple -231 to 231-1 N/A  
Fixed Point F Multiple -85 to +75 -187 to +346 Left¹
Graphic (DBCS) G One     Right
Fixed Point H Multiple -85 to +15 -187 to +346 Left¹
Length J Multiple     Left¹
Floating Point Hex L Multiple -85 to +75 0 to 27 Right¹
Floating Point Hex LH Multiple -231 to 231-1 0 to 27 Right¹
Floating Point Binary LB Multiple -231 to 231-1 N/A Right¹
Floating Point Decimal LD Multiple -231 to 231-1 N/A  
Floating Point Hex LQ Multiple -231 to 231-1 0 to 28 Right¹
Decimal P Multiple     Left
Offset Q Multiple     Left
Address R Multiple     Left
Address S Multiple      
Address V Multiple     Left
Hexadecimal X Multiple     Left
Address Y Multiple     Left
Decimal Z Multiple     Left
Notes:
  1. Errors are flagged if significant bits are truncated or if the value specified cannot be contained in the implicit length of the constant.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014