DB2 - Problem description
| Problem IC79903 | Status: Closed |
DB2DCLGN DOES NOT ADD A NULL TERMINATOR (\0) PLACE HOLDER FOR VARCHAR COLUMN WHEN GENERATING STRUCTURES FOR C LANGUAGE | |
| product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
| Problem description: | |
DB2DCLGN DOES NOT ADD A NULL TERMINATOR (\0) PLACE HOLDER for
VARCHAR column WHEN GENERATING STRUCTURES FOR C LANGUAGE
VARCHAR(n) without FOR BIT DATA.
Valid. Represent in C as SQLUDF_VARCHAR or char...[n+1]. (This
is a C null-terminated string.)
For a VARCHAR(n) parameter, DB2 will put a null in the (k+1)
position ,where k is the length of the particular string. The C
string-handling functions are well suited for manipulation of
these values. For a RETURNS VARCHAR(n) value or an output
parameter of a stored procedure, the routine body must delimit
the actual value with a null because DB2 will determine the
result length from this null character.
Example:
char arg2[51]; /* example for VARCHAR(50) */
char *result; /* also acceptable */
There is APAR JR18362 :DB2DCLGN DOES NOT ADD A NULL TERMINATOR
(\0) PLACE HOLDER WHEN GENERATING STRUCTURES FOR C LANGUAGE But
this APAR added a null terminator place holder only for CHAR
column. | |
| Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All DB2 Users * **************************************************************** * PROBLEM DESCRIPTION: * * DB2DCLGN DOES NOT ADD A NULL TERMINATOR (\0) PLACE HOLDER * * FOR VARCHAR COLUMN WHEN GENERATING STRUCTURES FOR C LANGUAGE * **************************************************************** * RECOMMENDATION: * * The customer need to upgrade fixpack v97fp6 or higher * * versions * **************************************************************** | |
| Local Fix: | |
| available fix packs: | |
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows | |
| Solution | |
The customer need to upgrade fixpack v97fp6 or higher versions | |
| Workaround | |
not known / see Local fix | |
| BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC84430 follow-up : | |
| Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 21.11.2011 08.06.2012 08.06.2012 |
| Problem solved at the following versions (IBM BugInfos) | |
9.7.FP6 | |
| Problem solved according to the fixlist(s) of the following version(s) | |
| 9.7.0.6 |
|