DB2 - Problem description
Problem IC62916 | Status: Closed |
CLI APPLICATION RECEIVES CLI0002W INSTEAD OF SQLSTATE=01003 FOR A QUERY AGAINST DB2 FOR Z/OS. | |
product: | |
DB2 CONNECT / DB2CONNCT / 950 - DB2 | |
Problem description: | |
A CLI application may receive a CLI0002W "Data Truncated" warning message when executing a query against DB2 for z/OS, when the expected warning is SQLSTATE=01003 "Null values were eliminated from the argument of a column function." When this warning is returned, DB2 for z/OS updates the SQLWARN[1] field in the SQLCA to either an "N" (for non-scrollable cursors) or "S" (for scrollable cursors). The DB2 CLI driver does not expect a value for SQLWARN[1], and if it does, it makes the assumption that data was truncated. SQLSTATE=01003 will be returned when the query uses an aggregate function like MAX() and the column contains NULL values. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * A CLI application may receive a CLI0002W "Data * * Truncated"warning message when executing a query against DB2 * * for z/OS,when the expected warning is SQLSTATE=01003 "Null * * valueswere eliminated from the argument of a column * * function."When this warning is returned, DB2 for z/OS * * updates theSQLWARN[1] field in the SQLCA to either an "N" * * (fornon-scrollable cursors) or "S" (for scrollable cursors). * * TheDB2 CLI driver does not expect a value for SQLWARN[1], * * andif it does, it makes the assumption that data was * * truncated. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 v9.5 Fixpack 6 * **************************************************************** | |
Local Fix: | |
On DB2 for z/OS there is a parameter called DISABSCL. If this parameter is set to YES, and the cursor specified is a non-scrollable cursor, then DB2 for z/OS will not return "N" in SQLWARN[1]. So, setting DISABSCL=YES might workaround the issue. The db2cli.ini keyword IGNOREWARNINGS=1 can be used as well to suppress all warnings, including the CLI0002W message. | |
available fix packs: | |
DB2 Version 9.5 Fix Pack 6a for Linux, UNIX, and Windows | |
Solution | |
First fixed in DB2 UDB Version 9.5, Fixpack 6 | |
Workaround | |
On DB2 for z/OS there is a parameter called DISABSCL. If this parameter is set to YES, and the cursor specified is a non-scrollable cursor, then DB2 for z/OS will not return "N" | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 01.09.2009 25.05.2010 16.12.2010 |
Problem solved at the following versions (IBM BugInfos) | |
9.5.FP6 | |
Problem solved according to the fixlist(s) of the following version(s) |