Overflow Behavior
The following table describes the overflow behavior when a packed decimal number is assigned to a smaller target. An exception is not generated when:
- A packed decimal is assigned to a smaller target with integral type.
- A packed decimal is assigned to a smaller target of floating point type.
An exception is generated when a packed decimal is assigned to a smaller packed decimal target. You can suppress runtime errors by using the #pragma nosigtrunc directive in your ILE C source code.
| From Field | To Field | Runtime Error |
|---|---|---|
| Packed Decimal | char, int, short, long, long long, bit | No |
| Packed Decimal | Packed Decimal | Yes |
| Packed Decimal | Float | No2 |
| Packed Decimal | Double | No1, 2 |
| Note:
|
||