We help IT Professionals succeed at work.

How do I store Chinese characters on an as400 database file.

carlaohare
carlaohare asked
on
3,902 Views
Last Modified: 2013-12-06
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.
 
Comment
Watch Question

VP / Senior Consultant
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Gary PattersonVP / Senior Consultant
CERTIFIED EXPERT

Commented:
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

Author

Commented:
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
 

Author

Commented:
Sorry,
Chinese data changed when I pressed enter button to the upside down question marks you see
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
That's great,

Thanks Gary & Tom for all the help.
Gary PattersonVP / Senior Consultant
CERTIFIED EXPERT

Commented:
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

Author

Commented:
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 PattersonVP / Senior Consultant
CERTIFIED EXPERT

Commented:
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

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.