Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Zoned decimal constants HLASM Language Reference SC26-4940-06 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Each digit is converted into its 8 bit EBCDIC representation (see 4 in Table 1). The sign indicator (see 5 in Table 1) replaces the first four bits of the low-order byte of the constant. Here are the range of values that can be assembled into a decimal constant:
For both packed and zoned decimals, a plus sign is translated into the hexadecimal digit C, a minus sign into the digit D. The packed decimal constants (P-type) are used for processing by the decimal instructions. If, in a constant with an implicit length, an even number of packed decimal digits is specified, one digit is left unpaired because the rightmost digit is paired with the sign. Therefore, in the leftmost byte, the leftmost four bits are set to zeros and the rightmost four bits contain the unpaired (first) digit.
In the following example, the DC statement specifies both packed
and zoned decimal constants. The length modifier applies to each
constant in the first operand (that is, to each packed decimal constant).
A literal cannot specify both operands.
The last example shows the use of a packed decimal literal.
|
Copyright IBM Corporation 1990, 2014
|