carlaohare
asked on
How do I store Chinese characters on an as400 database file.
I need to store a product code in English & a product description in Chinese on an AS400 database file.
I have the data on a spreadsheet & need to upload it to the AS400
I've created a physical file with a field defined with a data type of E (see below).
The Chinese characters show up as squares in the row & when I try and save it I get an error
"Column 2: CWBNL0107 - Converted 4 bytes, 2 errors found beginning at offset 0"
Does anyone know what I need to do to get the Chinese characters onto my AS400 data file.
I have the data on a spreadsheet & need to upload it to the AS400
I've created a physical file with a field defined with a data type of E (see below).
A R ITMTSTR
A TEXT('TEST ITEM FILE')
A ITPROD 20 TEXT('ENGLISH PRODUCT CODE')
A ITCDES 80E TEXT('CHINESE DESCRIPTION')
A K ITPROD
I inserted a row using iSeries navigator & copy & pasted the data from the first line of the spreadsheetThe Chinese characters show up as squares in the row & when I try and save it I get an error
"Column 2: CWBNL0107 - Converted 4 bytes, 2 errors found beginning at offset 0"
Does anyone know what I need to do to get the Chinese characters onto my AS400 data file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Gary,
Thanks for the help.
I did as you said & the data did upload to the AS400.
It doesn't look like the data on the spreadsheet but is that how it's meant to be e.g.
Data on spreadsheet looks like this
¿¿¿7814,¿¿¿¿,¿¿¿¿,¿¿¿
when I do DSPPFM on file its like this
é:VÑ+;a±>+;rÎQÎ'jJbÊ
537E6003030303024052818602 4052917D02 779D87
1FA595070801040CEDE61AFE0C EDE690680C 6D1122
Thanks for the help.
I did as you said & the data did upload to the AS400.
It doesn't look like the data on the spreadsheet but is that how it's meant to be e.g.
Data on spreadsheet looks like this
¿¿¿7814,¿¿¿¿,¿¿¿¿,¿¿¿
when I do DSPPFM on file its like this
é:VÑ+;a±>+;rÎQÎ'jJbÊ
537E6003030303024052818602
1FA595070801040CEDE61AFE0C
ASKER
Sorry,
Chinese data changed when I pressed enter button to the upside down question marks you see
Chinese data changed when I pressed enter button to the upside down question marks you see
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That's great,
Thanks Gary & Tom for all the help.
Thanks Gary & Tom for all the help.
Use the Run SQL Scripts utility in Navigator to view the Chinese characters. It works nicely with Unicode.
Gary's "Run SQL Scripts" suggestion is as good as it gets. I should have added it, but was thinking "green-screen". If Navigator can't do it (assuming a recent iSeries Access service pack), then the data and possibly the database still need work.
Tom
Tom
ASKER
Thanks Guys,
That worked like a dream, Now I just have to figure out how to print it all out again.
Thanks for all the help.
That worked like a dream, Now I just have to figure out how to print it all out again.
Thanks for all the help.
Well, Excel does a nice job of printing this sort of thing.
Use the File Transfer Add-in to download the final merged file, format it as desired, and print it.
- Gary Patterson
Use the File Transfer Add-in to download the final merged file, format it as desired, and print it.
- Gary Patterson
http://www.code400.com/forum/showthread.php/539-Add-in-for-Excel-to-pull-data-from-AS400
- Gary Patterson