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 IC63931 Status: Closed

FUNCTIONS DAYNAME & MONTHNAME MAY RETURN INCORRECT RESULTS IF IN PUT IS
NOT TIMESTAMP AND SYSTEM IS SET_UP WITH NON-EN_US LOCALE

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
The scalar functions DAYNAME and MONTHNAME may be resolved as 
SYSFUN version instead of SYSIBM version when the expression 
argument is not a timestamp. The SYSFUN version may return 
different results because the SYSFUN version does not 
depend on the CURRENT LOCALE LC_TIME special register. 
 
For example, if the CURRENT LOCALE LC_TIME is a fr_FR locale 
then the correct output for 
MONTHNAME('2007-03-09-14.07.38.123456') would be  'mars'. But 
since the expression is not a timestamp, the en_US value of 
'March' is returned in error. 
 
If the locale is en_US, then this problem will not occur and the 
correct results will be returned. 
The problem only has impact for locales other than en_US. 
However, please, note that SYSFUN version will not perform as 
well as the SYSIBM version. 
This APAR will ensure that SYSIBM version is used and will 
improve performance for en_US locales as well.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* DB2 LUW v97                                                  * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* The scalar functions DAYNAME and MONTHNAME may be resolved   * 
* as                                                           * 
* SYSFUN version instead of SYSIBM version when the expression * 
*                                                              * 
* argument is not a timestamp. The SYSFUN version may return   * 
*                                                              * 
* different results because the SYSFUN version does not        * 
*                                                              * 
* depend on the CURRENT LOCALE LC_TIME special register.       * 
*                                                              * 
*                                                              * 
*                                                              * 
* For example, if the CURRENT LOCALE LC_TIME is a fr_FR locale * 
*                                                              * 
* then the correct output for                                  * 
*                                                              * 
* MONTHNAME('2007-03-09-14.07.38.123456') would be  'mars'.    * 
* But                                                          * 
* since the expression is not a timestamp, the en_US value of  * 
*                                                              * 
* 'March' is returned in error.                                * 
*                                                              * 
*                                                              * 
*                                                              * 
* If the locale is en_US, then this problem will not occur and * 
* the                                                          * 
* correct results will be returned.                            * 
*                                                              * 
* The problem only has impact for locales other than en_US.    * 
*                                                              * 
* However, please, note that SYSFUN version will not perform   * 
* as                                                           * 
* well as the SYSIBM version.                                  * 
*                                                              * 
* This APAR will ensure that SYSIBM version is used and will   * 
*                                                              * 
* improve performance for en_US locales as well.               * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Install DB2 LUW v97 fixpak 1.                                * 
****************************************************************
Local Fix:
Two possible local fixes are: 
1) Qualify the function with SYSIBM, for example 
SYSIBM.MONTHNAME('2007-03-09-14.07.38.123456') will return 
'mars' in a fr_FR locale as expected 
2) Specify the expression with type as timestamp, for example 
MONTHNAME(timestamp '2007-03-09-14.07.38.123456') will return 
'mars' in a fr_FR locale as expected
available fix packs:
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 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 10 for Linux, UNIX, and Windows

Solution
Install DB2 LUW v97 fixpak 1.
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
21.10.2009
17.02.2010
17.02.2010
Problem solved at the following versions (IBM BugInfos)
9.7.
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.1 FixList