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


Truncation

HLASM Language Reference
SC26-4940-06

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:
  1. If significant bits are lost in the truncation of fixed-point constants, error diagnostic message ASMA072E Data item too large is issued.
  2. Floating-point constants (E, D, L) are not truncated. They are rounded to fit the space available—see Figure 1 for rounding modes.
  3. The above rules for padding and truncation also apply when using the bit-length modifier (see Subfield 5: Modifier).
  4. 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.
  5. 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.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014