+802 EXCEPTION ERROR exception-type HAS OCCURRED DURING operation-type OPERATION ON data-type DATA, POSITION position-number

Explanation

The exception error exception-type occurred while performing one of the following operations on a field that has a data-type of DECIMAL, FLOAT, SMALLINT, or INTEGER:
  • ADDITION
  • SUBTRACTION
  • MULTIPLICATION
  • DIVISION
  • NEGATION
  • BUILT-IN FUNCTION
The error occurred while processing an arithmetic expression in the SELECT list of an outer SELECT statement, and the position in the select list is denoted by position-number. The possible exception types are:
DECIMAL OVERFLOW
A decimal overflow exception can occur when one or more nonzero digits are lost because the destination field in any decimal operation is too short to contain the result.
DIVIDE EXCEPTION
A divide exception can occur on a decimal division operation when the quotient exceeds the specified data-field size. A zero divide exception occurs on any division by zero, except when the data type is DECFLOAT.
EXPONENT OVERFLOW
An exponent overflow can occur when the result characteristic of any floating-point operation exceeds 127 and the result fraction is not zero, i.e. the magnitude of the result exceeds approximately 7.2E+75.
FIXED POINT OVERFLOW
A fixed point overflow can occur during any arithmetic operation on either INTEGER or SMALLINT fields.
INVALID OPERATION
OUT OF RANGE
An error might occur during while processing an input, intermediate, or final value if the value of a parameter is out of range.
OVERFLOW
An overflow can occur during the processing of a built-in function. If the operation-type is FUNCTION, then the error occurred while processing an input, intermediate, or final value.
SUBNORMAL
UNDERFLOW
An underflow can occur during the processing of a built-in function. If the operation-type is FUNCTION, then the error occurred while processing an input, intermediate, or final value.
ZERO DIVIDE
The data type displayed in the message might indicate the data type of the temporary internal copy of the data. This might differ from the actual column or literal data type due to conversions by Db2.

Attention: Parts of exception-type, data-type, operation-type, and position-number might or might not be returned in SQLCA, depending upon when the error was detected.

System action

For each expression in error the indicator variable is set to negative two (-2) to indicate a null value returned. The data variable is unchanged. Execution of the statement continues with all non-error columns and expressions of the outer SELECT list being returned. If the statement is cursor controlled then the cursor will remain open.

Programmer response

Examine the expression for which the warning occurred to see if the cause (or the likely cause) of the problem can be determined. The problem may be data-dependent, in which case it will be necessary to examine the data that was being processed at the time the error occurred.

See the explanation of SQLCODE -405 for allowed ranges of numeric data types.

SQLSTATE

01519