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 IT04210 Status: Closed

EXPORT WITH "MODIFIED BY CODEPAGE" MAY TRUNCATE THE DATA.

product:
DB2 FOR LUW / DB2FORLUW / 970 - 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 9.7                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to Version 9.7 FixPack 11.                           * 
****************************************************************
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 9.7 FixPack 11.
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
04.09.2014
07.10.2015
07.10.2015
Problem solved at the following versions (IBM BugInfos)
9.7.FP11
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.11 FixList