DB2 - Problem description
Problem IT39993 | Status: Closed |
STRIPTNULLS MODIFIER IN LOAD AND IMPORT COMMANDS TRUNCATE NULLS (0X00) FROM GRAPHIC (FIXED-LENGTH) COLUMN, BUT IT SHOULD NOT | |
product: | |
DB2 FOR LUW / DB2FORLUW / B50 - DB2 | |
Problem description: | |
The Db2 manual text says striptnulls modifier controls trailing NULLs against variable-length field only. However, the modifier also truncates NULLs against GRAPHIC (fixed-length) field. LOAD command (same with IMPORT command) > striptnulls > Truncates any trailing NULLs (0x00 characters) when loading data into a variable-length field. The following scenario illustrates the problem. 1) Prepare data and a table. $ od -x T1.dat 0000000 3100 000a $ db2 "create table T1 (c1 int, c2 char(2) not null, c3 varchar(2) not null, c4 graphic(1) not null, c5 vargraphic(1) not null" 2) LOAD 0x0000 into string columns with striptnulls we can see expected results in char, varchar and vargraphic columns, but LOAD truncates 0x00 in graphic column. $ db2 "load from T1.dat of asc modified by striptnulls method L (1 1, 2 3, 2 3, 2 3, 2 3) replace into T1" $ db2 "select hex(c2), hex(c3), hex(c4), hex(c5) from T1" 1 2 3 4 ---- ---- ---- ---- 0000 0020 Note: U+0020 is a space The results should be as below: $ db2 "select hex(c2), hex(c3), hex(c4), hex(c5) from T1" 1 2 3 4 ---- ---- ---- ---- 0000 0000 | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All users * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 v11.5.7.1 * **************************************************************** | |
Local Fix: | |
Solution | |
Workaround | |
**************************************************************** * USERS AFFECTED: * * All users * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 v11.5.7.1 * **************************************************************** | |
Comment | |
Problem was first fixed in Db2 v11.5.7.1 | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 16.02.2022 18.02.2022 18.02.2022 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |