IBM Support

LI72204: DB2 V9 SQL BUILTIN DATE FUNCTIONS DAYNAME() AND MONTHNAME() RETURN RESULTS IN ENGLISH ONLY

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • With DB2 V9 SQL builtin functions dayname() or monthname()
    return their results in English language only even if a
    different locale has been specified by the LANG variable.
    This has worked in DB2 Version 8.
    
    For example SQL dayname() returns the weekday in English
    regardless if LANG has been specified to a specific language
    like German or French.
    
    $ export LANG=de_DE
    $ locale
    LANG=de_DE
    LC_COLLATE="de_DE"
    LC_CTYPE="de_DE"
    LC_MONETARY="de_DE"
    LC_NUMERIC="de_DE"
    LC_TIME="de_DE"
    LC_MESSAGES="de_DE"
    LC_ALL=
    
    $ db2start
    $ db2 connect to sample
    $ db2 "values dayname(current date)"
    
    1
    ----------------------------------------------------------------
    ------------------------------------
    Monday
    
      1 record(s) selected.
    
    You can see "Monday" is returned while the german word "Montag"
    should have been returned.
    

Local fix

Problem summary

  • Users Affected: ALL
    
    Problem Description:
    
    For example SQL dayname() returns the weekday in English
    regardless if LANG has been specified to a specific language
    like German or French.
    
    $ export LANG=de_DE
    $ locale
    LANG=de_DE
    LC_COLLATE="de_DE"
    LC_CTYPE="de_DE"
    LC_MONETARY="de_DE"
    LC_NUMERIC="de_DE"
    LC_TIME="de_DE"
    LC_MESSAGES="de_DE"
    LC_ALL=
    
    $ db2start
    $ db2 connect to sample
    $ db2 "values dayname(current date)"
    
    1
    ----------------------------------------------------------------
    ------------------------------------
    Monday
    
      1 record(s) selected.
    
    You can see "Monday" is returned while the german word "Montag"
    should have been returned.
    
    
    Problem Summary:
    
    For example SQL dayname() returns the weekday in English
    regardless if LANG has been specified to a specific language
    like German or French.
    
    $ export LANG=de_DE
    $ locale
    LANG=de_DE
    LC_COLLATE="de_DE"
    LC_CTYPE="de_DE"
    LC_MONETARY="de_DE"
    LC_NUMERIC="de_DE"
    LC_TIME="de_DE"
    LC_MESSAGES="de_DE"
    LC_ALL=
    
    $ db2start
    $ db2 connect to sample
    $ db2 "values dayname(current date)"
    
    1
    ----------------------------------------------------------------
    ------------------------------------
    Monday
    
      1 record(s) selected.
    
    You can see "Monday" is returned while the german word "Montag"
    should have been returned.
    

Problem conclusion

  • First fixed in DB2 UDB Version 9.1, FixPak 3 (build s070719)
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI72204

  • Reported component name

    DB2 UDE ESE LIN

  • Reported component ID

    5765F4104

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2007-04-18

  • Closed date

    2007-08-23

  • Last modified date

    2009-08-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 UDE ESE LIN

  • Fixed component ID

    5765F4104

Applicable component levels

  • R910 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"910","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
07 January 2022