Link to home
Start Free TrialLog in
Avatar of carlaohare
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).
 
     A          R ITMTSTR                                              
     A                                      TEXT('TEST ITEM FILE')     
     A            ITPROD        20          TEXT('ENGLISH PRODUCT CODE')
     A            ITCDES        80E         TEXT('CHINESE DESCRIPTION')
     A          K ITPROD                                               

Open in new window

I inserted a row using iSeries navigator & copy & pasted the data from the first line of the spreadsheet
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.
 
ASKER CERTIFIED SOLUTION
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here are basic instructions for installing the File Transfer Add-In, just in case:

http://www.code400.com/forum/showthread.php/539-Add-in-for-Excel-to-pull-data-from-AS400

- Gary Patterson
Avatar of carlaohare
carlaohare

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Ê
537E60030303030240528186024052917D02779D87
1FA595070801040CEDE61AFE0CEDE690680C6D1122
 
Sorry,
Chinese data changed when I pressed enter button to the upside down question marks you see
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That's great,

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
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.
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