home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC86177 Status: Closed

Inconsistent removal of trailing and leading zeros when converting number
literals to string in NUMBER datatype mode

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
This APAR is only applicable to databases created with NUMBER 
data type compatibility feature turned on. It contains two parts 
 
Part 1: 
The VARCHAR function applied to a number literal does not remove 
the trailing zeros. This APAR provides a fix to remove the 
trailing zeros from the input number literal to be 
consistent with the CHAR function. For example: 
 
CHAR(0123.450) 
 
returns 
 
123.45 
 
By applying this fix, 
 
VARCHAR(0123.450) 
 
will also return 
 
123.45 
 
 
Part 2: 
The CAST specification with a number literal as the operand and 
cast to CHAR, VARCHAR, GRAPHIC, VARGRAPHIC does not conform to 
the semantic of the equivalent function forms, such as 
CHAR(123.450), VARCHAR(123.450). With the fix provided by this 
APAR, all castings using the CAST keyword to CHAR, VARCHAR, 
GRAPHIC, VARGRAPHIC will return the string representation of the 
number literal with all the leading and trailing zeros removed. 
For example, 
 
CAST(123.450 as VARCHAR(20)) 
 
will return the string "123.45". 
 
Note: 
The database with the NUMBER data type enabled will have the 
number_compat database configuration parameter set to ON. The 
NUMBER data type feature is enabled when setting the fifth bit 
position of the DB2_COMPATIBILITY_VECTOR (0x10) prior to the 
creation of the database.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* when the database was created with number_compat database    * 
* configuration parameter set to ON.                           * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 version 9.7 Fix Pack 7.                       * 
****************************************************************
Local Fix:
available fix packs:
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
Upgrade to DB2 version 9.7 Fix Pack 7.
Workaround
not known / see Local fix
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC88644 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
28.08.2012
20.10.2012
20.10.2012
Problem solved at the following versions (IBM BugInfos)
9.7.FP7
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.7 FixList