DB2 - Problem description
Problem IT06572 | Status: Closed |
EXPORT WITH "MODIFIED BY CODEPAGE" MAY TRUNCATE THE DATA. | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
EXPORT from sjis database to a utf8 code page file with "modified by codepage=1208", exported data may be truncated unexpectedly. Problem Reproducible Steps: =========================== -------------------------------------------------------- case1_step1.sh -------------------------------------------------------- #!/bin/sh # sjis db -> utf8 export # This file contains sjis Japanese characters export LANG=Ja_JP db2start db2 "drop db SJIS" db2 "create database SJIS using codeset IBM-943 territory JP" db2 "connect to SJIS" db2 "create table TAB1 (col1 VARCHAR(60), col2 VARCHAR(60))" db2 "insert into TAB1 (col1, col2) values ('??????????????????????????????','????????????????????????????? ???????????????????????????????')" db2 "terminate" -------------------------------------------------------- case1_step2.sh -------------------------------------------------------- #!/bin/sh # sjis db -> utf8 export export LANG=Ja_JP db2 "connect to SJIS" db2 -ec -a "export to tab1.sjis.del of del modified by codepage=1208 select * from TAB1" db2 "terminate" -------------------------------------------------------- 1. $ export LANG=Ja_JP ==>> set terminal, Ja_JP (sjis) enable to send/receive 2. $ case1_step1.sh 3. $ case1_step2.sh ==>> No SQL3132W is returned and sqlcode is 0 ==>> using "modified by codepage=1208" to convert from SJIS to UTF8 4. $ export LANG=JA_JP ==>> set terminal, JA_JP (utf8) enable to send/receive 5. $ more tab1.sjis.del "????????????????????","????????????????????" ==>> The exported del file contains only first 20 chars truncated columns as above. Root cause: EXPORT command can not handle data ideally when code conversion is occurred with "modified by codepage" option. Condition of problem: When "modified by codepage" option is used under some code conversion situations. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * DB2 UDB Version 10.5 * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Version 10.5 FixPack 7. * **************************************************************** | |
Local Fix: | |
Remove "modified by codepage" from EXPORT and set DB2 registry variable DB2CODEPAGE instead if possible. | |
Solution | |
Problem was first fixed in DB2 UDB Version 10.5 FixPack 7. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 19.01.2015 19.01.2016 19.01.2016 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.5.0.7 |