home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC88620 Status: Closed

DB2BATCH MAY THROW "CLI0002W DATA TRUNCATED" WHILE FETCHING VARC
HAR/CHAR COLUMNS FROM DIFFERENT CODEPAGE DATABASE THAN CLIENT

product:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problem description:
If there is a multi-byte code string in CHAR or VARCHAR data 
type column, the db2batch command on the unicode codeset client 
returns "CLI0002W Data truncated" message in CLI layer and the 
output string is truncated during fetching the column data like 
below when the database codeset is different from the client. 
 
  Sample SQL : 
    SELECT COL_CHAR FROM T1 WHERE COL_CHAR IS NOT NULL; 
 
  CLI message : 
    "(-99999): [IBM][CLI Driver] CLI0002W  Data truncated" 
 
  And cli trace shows less cbValueMax value in SQLBindCol() like 
cbValueMax=11 than pcbValue in SQLFetch() like pcbValue=15 is 
defined by db2batch command. 
 
  ... SQLDescribeCol( pszColName="COL_VARCHAR", 
psColNameCharLen=11, psSQLType=SQL_VARCHAR, pcbColDef=10, 
psScale=0, psNullable=SQL_NULLABLE ) 
  ...     <--- SQL_SUCCESS   Time elapsed - +5.844600E-002 
seconds 
 
  ... SQLBindCol( hStmt=1:1, iCol=1, fCType=SQL_C_CHAR, 
rgbValue=&02d72968, cbValueMax=11, pcbValue=&02d311b8 ) 
  ...     ---> Time elapsed - +3.484000E-003 seconds 
 
  ... SQLBindCol( ) 
  ...     <--- SQL_SUCCESS   Time elapsed - +3.025800E-002 
seconds 
 
  ... SQLFetch( hStmt=1:1 ) 
  ...     ---> Time elapsed - +3.644000E-003 seconds 
  ... ( iRow=1, iCol=1, fCType=SQL_C_CHAR, 
rgbValue="<EF><BC><91><EF><BC><92><EF><BC><93> " - 
x'EFBC91EFBC92EFBC932000', pcbValue=15 ) 
 
  ... SQLFetch( ) 
  ...     <--- SQL_SUCCESS_WITH_INFO   Time elapsed - 
+3.775900E-002 seconds 
 
  ... SQLFetch( hStmt=1:1 ) 
  ...     ---> Time elapsed - +5.124000E-003 seconds 
  ... ( Unretrieved error message="[IBM][CLI Driver] CLI0002W 
<E3><83><87><E3><83><BC><E3><82><BF><E3><81><8C><E5><88><87><E3> 
<82><8A><E6><8D><A8><E3><81><A6><E3><82><89><E3><82><8C><E3><81> 
<BE><E3><81><97><E3><81><9F><E3><80><82> SQLSTATE=01004" )
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* db2batch user on connecting to the different codepage        * 
* database                                                     * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to db2 Version 10.1 FixPack 2                        * 
****************************************************************
Local Fix:
Use the same codeset on the client as the database codeset. 
  ex, export DB2CODEPAGE=< database codepage > and recycle the 
application
available fix packs:
DB2 Version 10.1 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 6 for Linux, UNIX, and Windows

Solution
Problem was first fixed in Version 10.1 FixPack 2
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
27.11.2012
19.12.2012
19.12.2012
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
10.1.0.2 FixList
10.5.0.2 FixList