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


Decimal constants—P and Z

HLASM Language Reference
SC26-4940-06

The decimal constants let you introduce data in a form suitable for operations on decimal data. The packed decimal constants (P-type) are used for processing by the decimal instructions. The zoned decimal constants (Z-type) are in the form (EBCDIC representation) you can use as a print image, except for the digit in the rightmost byte.

The nominal value can be a signed (plus is assumed if the number is unsigned) decimal number. A decimal point can be written anywhere in the number, or it can be omitted. The placement of a decimal point in the definition does not affect the assembly of the constant in any way, because the decimal point is not assembled into the constant. It it only affects the integer and scaling attributes of the symbol that names the constant.

The specified digits are assumed to constitute an integer (see  1  in Table 1). You can determine correct decimal point alignment either by defining data so that the point is aligned or by selecting machine instructions that operate on the data correctly (that is, shift it for purposes of decimal point alignment).

Decimal constants are assembled as follows:

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014