IBM Support

IT01827: INSERT FROM A CLI APPLICATION FAILS WITH CLI0112E WHEN DOUBLE DATA TYPE COLUMN IS BOUND AS VARCHAR

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • While inserting a row that has double column, insert may fail
    with CLI0112E: Error in assignment, if in CLI application double
    column was bound as
    Varchar, even though the inserted value is within the double
    range.
    
    Steps to reproduce the error:
    
    create table abcd ( col1 int, col2 int, col3 double precision);
    
    ---
    opt echo on
    opt callerror on
    sqlallocenv 1
    sqlallocconnect 1 1
    sqldriverconnect  1 0 "DSN=sample;uid=xxx;pwd=****;" -3 200
    SQL_DRIVER_NOPROMPT
    sqlallocstmt 1 1
    getmem 1 1 SQL_C_LONG
    getmem 1 2 SQL_C_LONG
    getmem 1 3 SQL_C_CHAR 500
    updatemem 1 SQL_C_LONG value 23
    updatemem 2 SQL_C_LONG value 45
    updatemem 3 SQL_C_CHAR value 307
    "-0.000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000
    000000000000000000000000000000000000000440935284694"
    sqlprepare 1 "insert into abcd values (?,?,?)" -3
    sqlbindparameter 1 1 SQL_PARAM_INPUT SQL_C_LONG SQL_INTEGER 0 0
    1
    sqlbindparameter 1 2 SQL_PARAM_INPUT SQL_C_LONG SQL_INTEGER 0 0
    2
    sqlbindparameter 1 3 SQL_PARAM_INPUT SQL_C_CHAR SQL_VARCHAR 0 0
    3
    sqlexecute 1
    sqltransact 1 1 SQL_COMMIT
    killenv 1
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * CLI application Users                                        *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 V9.7 FP10 or higher                           *
    ****************************************************************
    

Problem conclusion

  • First fixed in DB2 V9.7 FP10
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT01827

  • 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

    2014-05-15

  • Closed date

    2014-11-24

  • Last modified date

    2014-11-24

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

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

    IT05627

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IT01827

Modified date: 24 November 2014