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

Avatar of undefined
Last Comment
Gary Patterson, CISSP

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Gary Patterson, CISSP

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Gary Patterson, CISSP

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

ASKER
Sorry,
Chinese data changed when I pressed enter button to the upside down question marks you see
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
SOLUTION
Member_2_276102

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
carlaohare

ASKER
That's great,

Thanks Gary & Tom for all the help.
Gary Patterson, CISSP

Use the Run SQL Scripts utility in Navigator to view the Chinese characters. It works nicely with Unicode.
Member_2_276102

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
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
carlaohare

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.
Gary Patterson, CISSP

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