ILE C/C++ Programmer's Guide

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:

An exception is generated when a packed decimal is assigned to a smaller packed decimal target. You can suppress run-time errors by using the #pragma nosigtrunc directive in your ILE C source code.

Table 26. Handling Overflow from a Packed Decimal to a Smaller Target

From Field To Field Run-Time 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

Notes:

  1. There is no packed decimal number large enough to cause overflow when the packed decimal is assigned to a double.

  2. If you use the MI instruction setca to unmask a floating point exception, you receive an error message MCH1213 for a floating point inexact result.


[ Top of Page | Previous Page | Next Page | Table of Contents ]