Learn it on Mainframe Path. Do it with Mainframe KIT.Learn on Mainframe Path ▸
Mainframe KIT ● Nothing leaves this tab

+802

Arithmetic exception during an operationPOSITIVE SQLCODE (WARNING) · CHECKED 2026-11-14
Checked against IBM documentation

An arithmetic operation or built-in function failed on one expression. The indicator is set to -2 and the statement continues.

QUICK ANSWER

An arithmetic operation or built-in function failed on one expression. The indicator is set to -2 and the statement continues.

LIKELY CAUSES, IN THE ORDER OF THIS ENTRY

  1. A decimal or integer result is too large for its destination field.
  2. A division by zero occurs.
  3. A floating-point result exceeds the exponent range.
  4. A built-in function receives or produces a value out of range.

CHECKED 14 Nov 2026 IBM: Db2 13 for z/OS: SQLCODE +802 (Db2 for z/OS 13.0.0)

TRY IT: RECORD DECODER ▸

MOST LIKELY

A decimal or integer result is too large for its destination field.

FIRST CHECK

Examine the failing expression and its position in the select list.

TRY IT ▸

Record decoder

What it means

The exception occurred during addition, subtraction, multiplication, division, negation or a built-in function on DECIMAL, FLOAT, SMALLINT or INTEGER data, in the outer SELECT list. SQLSTATE is 01519.

Exception types include decimal overflow, divide exception, exponent overflow, fixed point overflow, zero divide, out of range, overflow and underflow. The cursor remains open and other columns are returned.

Typical causes

  • A decimal or integer result is too large for its destination field.
  • A division by zero occurs.
  • A floating-point result exceeds the exponent range.
  • A built-in function receives or produces a value out of range.

How to fix it

  1. Examine the failing expression and its position in the select list.
  2. Examine the data being processed, because the problem may be data-dependent.
  3. See SQLCODE -405 for allowed numeric ranges.