IBM Support

IC73585: DECFLOAT_FORMAT AND VARCHAR_FORMAT MAY FAIL WHEN LEADING BLANKS IN ARGUMENTS ARE PRESENT.

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • DECFLOAT_FORMAT and VARCHAR_FORMAT functions with a numeric
    first
    argument may fail or return unexpected results if there are
    leading
    blanks in the input arguments.
    
    Sample scenarios where wrong behavior may be encountered :
    
    DECFLOAT_FORMAT with format string having more than 5 leading
    blanks returns SQL20476N instead of the value.
    
    VARCHAR_FORMAT with format string having more than 5 leading
    blanks returns SQL20476N  instead of the value
    
    VARCHAR_FORMAT with all blanks  in the format-string may return
    unexpected result instead of expected SQL20476N
    
    DECFLOAT_FORMAT with more than 4 leading blanks in input string
    returns SQL20477N instead of the value.
    

Local fix

  • Strip leading blanks from input arguments before passing them in
    to DECFLOAT and VARCHAR_FORMAT functions.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users of VARCHAR and DECFLOAT_FORMAT functions               *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * INCORRECT HANDLING OF LEADING BLANKS IN ARGUMENTS OF         *
    * DECFLOAT_FORMAT AND VARCHAR_FORMAT FOR DECFLOAT TO VARCHAR   *
    * SCENARIO                                                     *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Install 97FP4 or later which contain the fix, or eliminate   *
    * leading blanks from input arguments to VARCHAR_FORMAT and    *
    * DECFLOAT_FORMAT functions                                    *
    ****************************************************************
    

Problem conclusion

  • Install 97FP4 or later which contain the fix, or eliminate
    leading blanks from input arguments to VARCHAR_FORMAT and
    DECFLOAT_FORMAT functions
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC73585

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-12-29

  • Closed date

    2011-04-28

  • Last modified date

    2011-04-28

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

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

    IC73587

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSY

       UP

  • R980 PSY

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC73585

Modified date: 28 April 2011