Errors

Two types of errors can occur during arithmetic operations.

  • Overflow or Underflow

    This error occurs if the exponential part of a result would exceed the range that the language processor can handle, when the result is formatted according to the current settings of NUMERIC DIGITS and NUMERIC FORM. The language defines a minimum capability for the exponential part, namely the largest number that can be expressed as an exact integer in default precision. Because the default precision is 9, REXX/CICS supports exponents in the range -999999999 through 999999999.

    Because this allows for (very) large exponents, overflow or underflow is treated as a syntax error.

  • Insufficient storage

    Storage is needed for calculations and intermediate results, and on occasion an arithmetic operation may fail because of lack of storage. This is considered a terminating error as usual, rather than an arithmetic error.