IBM Support

PI61514: TRUNCATION ERROR SQLSTATE=01004 ERRLOC=7:33:10 IN COLUMN WITH BINARY DATA BUT NOT DEFINED AS FOR BIT DATA WHEN LBF IS ENABLE

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Truncation error SQLSTATE=01004 ERRLOC=7:33:10 in column with
    binary data but not defined as for bit data when
    LIMITEDBLOCKFETCH = 1
    
    LIMITEDBLOCKFETCH is automatically enable as soon as migrating
    to DB2 V11
    

Local fix

  • Set LIMITEDBLOCKFETCH=0 in DSNAOINI
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All users of DB2 Version 10 and              *
    *                 DB2 Version 11 for z/OS ODBC/CLI driver      *
    ****************************************************************
    * PROBLEM DESCRIPTION: Fetching SQL_C_BINARY data from a CHAR  *
    *                      column that is not defined as FOR BIT   *
    *                      DATA fails with truncation error        *
    *                      SQLSTATE=01004 ERRLOC=7:33:10 when      *
    *                      LIMITEDBLOCKFETCH is enabled.           *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    With INI configuration keyword LIMITEDBLOCKFETCH enabled, ODBC
    driver returned truncation error SQLSTATE=01004 when fetching
    binary data into SQL_C_BINARY from SQL_CHAR column which is
    not defined as CHAR(n) FOR BIT DATA.
    
    The following example illustrates the problem:
    
    1. Set ODBC INI configuration keyword LIMITEDBLOCKFETCH = 1.
    
    2. Create a table with a column CHAR(n) FOR SBCS DATA and
       populate the table with binary data.
    
    3. Call SQLPrepare() to prepare a select statement which
       returns the CHAR(n) FOR SBCS DATA column.
    
    4. Call SQLBindCol() to bind the SQL_CHAR column with c data
       type SQL_C_BINARY.
    
    5. Call SQLExecute().
    
    6. Call SQLFetch() which returns SQL_SUCCESS_WITH_INFO
       with the following truncation error(on DB2 11):
       SQLSTATE: 01004
       SQLCODE: -99999
       message text: {DB2 FOR OS/390}{ODBC DRIVER}  SQLSTATE=01004
                     ERRLOC=7:33:10
    

Problem conclusion

  • Code has been changed to correctly fetch binary data into
    SQL_C_BINARY from SQL_CHAR column when the column is not
    defined as FOR BIT DATA.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI61514

  • 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

    2016-04-27

  • Closed date

    2016-07-26

  • Last modified date

    2016-09-02

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

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

    UI39979 UI39980

Modules/Macros

  •    DSNAOCLI DSNAOC27 DSNAOG27 DSNAOSDK
    

Fix information

  • Fixed component name

    DB2 ODBC/JDBC/S

  • Fixed component ID

    5740XYR02

Applicable component levels

  • RA17 PSY UI39979

       UP16/08/25 P F608

  • RB17 PSY UI39980

       UP16/08/25 P F608

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:
04 March 2021