IBM Support

IT01000: CHAR(' ',0) RETURNS EMPTY STRING INSTEAD OF NULL IN VARCHAR2 ENABLED DATABASE.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • In a VARCHAR2 enabled database, an assignment of an empty string
    value to a CHAR, VARCHAR, GRAPHIC or VARGRAPHIC should produce a
    NULL value.  However, if a string literal is not empty, consists
    of all blanks is passed as an argument to the scalar functions
    CHAR, VARCHAR, GRAPHIC or VARGRAPHIC, and has a specified length
    of 0, then an empty string is returned instead of the expected
    NULL.  The returned string might look like the following sample:
    
    values char('   ',0)
    
    1
    -
    
    
      1 record(s) selected.
    

Local fix

  • Change the string literal to an empty string.  For example,
    changing the string literal to CHAR('',0) will fix this issue.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 version 10.5 fix pack 4                       *
    ****************************************************************
    

Problem conclusion

  • First fixed in DB2 version 10.5 fix pack 4
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT01000

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    A50

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-04-11

  • Closed date

    2014-09-08

  • Last modified date

    2015-04-07

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IT01100 IT01101 IT01649 IT01650

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RA50 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":"10.5","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
12 January 2022