IBM Support

PI80910: INCORRECT LENGTH RETURNED WHEN FETCHING DECFLOAT DATA WITH LBF ENABLED

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When fetching DECFLOAT data with LIMITEDBLOCKFETCH enabled in
    the initialization file, incorrect length is returned.
    

Local fix

  • set LIMITEDBLOCKFETCH=0 in the DSNAOINI file
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All users of DB2 10, 11 and 12 for                           *
    * z/OS ODBC/CLI driver                                         *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Incorrect data length is returned when:                      *
    * 1. fetching from a numeric column                            *
    * into a buffer of C type                                      *
    * SQL_C_DECIMAL64 or SQL_C_DECIMAL128.                         *
    * 2. fetching from a DECFLOAT column                           *
    * into a buffer of C type SQL_C_LONG,                          *
    * SQL_C_SHORT, SQL_C_BIGINT,                                   *
    * SQL_C_FLOAT, SQL_C_DOUBLE,                                   *
    * SQL_C_TINYINT, SQL_C_BIT,                                    *
    * SQL_C_DECIMAL64, or                                          *
    * SQL_C_DECIMAL128.                                            *
    * 3. fetching from a char or varchar                           *
    * column into a buffer of C type                               *
    * SQL_C_DECIMAL64 or SQL_C_DECIMAL128.                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Apply corrective PTF when available                          *
    ****************************************************************
    Incorrect data length is returned when fetching DECFLOAT data
    as follows:
    
    1. fetching from a DECIMAL, NUMERIC, SMALLINT, INTEGER, REAL,
    DOUBLE, FLOAT, or BIGINT column into a buffer of C type
    SQL_C_DECIMAL64 or SQL_C_DECIMAL128.
    
    2. fetching from a DECFLOAT(16) or DECFLOAT(34) column into
    a buffer of C type SQL_C_LONG, SQL_C_SHORT, SQL_C_BIGINT,
    SQL_C_FLOAT, SQL_C_DOUBLE, SQL_C_TINYINT, SQL_C_BIT,
    SQL_C_DECIMAL64, or SQL_C_DECIMAL128.
    
    3. fetching from a CHAR or VARCHAR column into a buffer of
    C type SQL_C_DECIMAL64 or SQL_C_DECIMAL128.
    
    The following example illustrates the problem:
    
    1. Prepare and execute a SELECT statement to return a
    DECFLOAT(16) or DECFLOAT(34) column.
    
    2. Issue SQLBindCol() to bind the result set column
    with C data type SQL_C_DECIMAL64.
    
    rc=SQLBindCol(hstmt,
                  1,
                  SQL_C_DECIMAL64,
                  (SQLPOINTER)rgbValue,
                  (SQLINTEGER)cbValueMax,
                  (SQLINTEGER *)pcbValue);
    
    3. Incorrect data length is returned in the length buffer
    pointed to by pcbValue.  The length for SQL_C_DECIMAL64
    should always be set to 8.
    

Problem conclusion

  • Code has been changed to correctly process the data length.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI80910

  • Reported component name

    DB2 ODBC/JDBC/S

  • Reported component ID

    5740XYR02

  • Reported release

    B17

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-05-02

  • Closed date

    2017-12-11

  • Last modified date

    2018-01-03

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

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

    UI52587 UI52588 UI52589

Modules/Macros

  • DSNAOG28 DSNAOCLI DSNAOC05 DSNAOC28 DSNAOSDK DSNAOG05
    

Fix information

  • Fixed component name

    DB2 ODBC/JDBC/S

  • Fixed component ID

    5740XYR02

Applicable component levels

  • RC17 PSY UI52587

       UP17/12/27 P F712

  • RB17 PSY UI52589

       UP17/12/28 P F712

  • RA17 PSY UI52588

       UP17/12/28 P F712

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"B17"}]

Document Information

Modified date:
05 March 2021