IBM Support

IT01100: 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 users                                                    *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 version 10.1.0.4.                             *
    ****************************************************************
    

Problem conclusion

  • The problem is first fixed in DB2 version 10.1.0.4.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT01100

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-04-16

  • Closed date

    2014-05-08

  • Last modified date

    2014-05-26

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

    IT01000

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

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RA10 PSN

       UP

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"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.1"}]

Document Information

Modified date:
24 September 2021