If less space is available than is needed to accommodate the nominal
value, the nominal value is truncated and part of the constant is
lost. Truncation of the nominal value is:
- On the left for the binary (B), hexadecimal (X), fixed-point (H
and F), and decimal (P and Z)
- On the right for the character (C) constant, the Unicode character
(CU) constant, and the graphic (G) constant
- On the left for absolute or relocatable address (A and Y), the
external address (V), offset (Q), length (J) and PSECT address (R)
constants. The actual value stored and any possible
truncation is dependent on the values inserted by the linker/binder
and the length of the constant.
Notes: - If significant bits are lost in the truncation of fixed-point
constants, error diagnostic message ASMA072E Data item too
large is issued.
- Floating-point constants (E, D, L) are not truncated. They are
rounded to fit the space available—see Figure 1 for
rounding modes.
- The above rules for padding and truncation also apply when using
the bit-length modifier (see Subfield 5: Modifier).
- Double-byte data in C-type constants cannot be truncated because
truncation creates incorrect double-byte data. Error ASMA208E
Truncation into double-byte data is not permitted is issued
if such truncation is attempted.
- Truncation of double-byte data in CU-type and G-type constants
is permitted because the length modifier restrictions (see Subfield 5: Modifier) ensure that incorrect double-byte data
cannot be created by truncation. However, truncating bit-length constants
might create incorrect double-byte data.