Fixes are available
APAR status
Closed as program error.
Error description
If you have set the min_dec_div_3 database configuration parameter to YES, a decimal division with a resulting precision of 32 and a scale of 3 returns incorrect results. The error message SQL0802N is not returned, this message should be returned when the resulting precision is higher than 31. The following examples show the results of decimal divisions when the min_dec_div_3 database configuration parameter is set to YES: Example #1: db2 "select 10000000000000000000000000000/1 from sysibm.sysdummy1" Result for Example #1: 1 --------------------------------- 0,000 1 record(s) selected. Example #2: $ db2 "VALUES (DEC(100000000000000000000000000000,30,0)/DEC(10,2,0))" Result for Example #2: 1 --------------------------------- 0.000 Example #3: db2 "VALUES (DEC(100000000000000000000000000000,30,0)/DEC(1,1,0))" Result for Example #3: 1 --------------------------------- SQL0802N Arithmetic overflow or other arithmetic exception occurred. SQLSTATE=22003 Example #1 and Example #2 should have returned the SQL0802N error message.
Local fix
Disable decimal division scale to 3 by setting the min_dec_div_3 database configuration parameter to NO.
Problem summary
**************************************************************** * USERS AFFECTED: * * databases with MIN_DEC_DIV_3=YES * **************************************************************** * PROBLEM DESCRIPTION: * * If you have set the min_dec_div_3 database configuration * * * * parameter to YES, a decimal division with a resulting * * precision * * of 32 and a scale of 3 returns incorrect results. The error * * * * message SQL0802N is not returned, this message should be * * * * returned when the resulting precision is higher than 31. * **************************************************************** * RECOMMENDATION: * * Disable decimal division scale to 3 by setting the * * min_dec_div_3database configuration parameter to NO. * ****************************************************************
Problem conclusion
If you have set the min_dec_div_3 database configuration parameter to YES, a decimal division with a resulting precision of 32 and a scale of 3 returns incorrect results. The error message SQL0802N is not returned, this message should be returned when the resulting precision is higher than 31.
Temporary fix
see LOCAL FIX.
Comments
APAR Information
APAR number
LI74151
Reported component name
DB2 UDB QP LINU
Reported component ID
5724E2504
Reported release
910
Status
CLOSED PER
PE
NoPE
HIPER
YesHIPER
Special Attention
NoSpecatt
Submitted date
2009-01-26
Closed date
2009-10-06
Last modified date
2009-10-06
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
DB2 UDB QP LINU
Fixed component ID
5724E2504
Applicable component levels
R910 PSY
UP
[{"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Product":{"code":"SSEPGA","label":"DB2 Query Patroller"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"910"}]
Document Information
Modified date:
17 October 2021