ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Question of EBCDIC to ASCII conversion

Post new topic  Reply to topic
 Question of EBCDIC to ASCII conversion « View previous topic :: View next topic » 
Author Message
willhuang_78
PostPosted: Mon Dec 20, 2004 5:22 pm    Post subject: Question of EBCDIC to ASCII conversion Reply with quote

Newbie

Joined: 20 Dec 2004
Posts: 9

Hi:
I currently have a working application that receives messages from a mainframe(os/390) through MQ to a java app. The java app is ASCII, but the mainframe is EBCDIC. At the moment I translate the message in my java app from EBCDIE to ASCII. I receive messages using JMS but in which there are some chinese words, they shows "??...", how do I identify them from the type of String? How do I config MQ's CCSID?

Thanks in advance.


Will
_________________
hi~
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Mon Dec 20, 2004 7:42 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You should not have to translate from EBCDIC
Make sure that the message format is MQSTR
Make sure that the open option is with Convert (mq java).
JMS should be setting this option for you automatically
Finally check that there is a translation option from one CCSID to the other.
(Read intercomm manual about CCSID translation tables)
Enjoy
Back to top
View user's profile Send private message Send e-mail
willhuang_78
PostPosted: Tue Dec 21, 2004 3:17 am    Post subject: Reply with quote

Newbie

Joined: 20 Dec 2004
Posts: 9

Where can config MQSTR ?
_________________
hi~
Back to top
View user's profile Send private message Send e-mail
willhuang_78
PostPosted: Tue Dec 21, 2004 3:21 am    Post subject: Reply with quote

Newbie

Joined: 20 Dec 2004
Posts: 9

But in the String,there some chinese word, they can not be showed, how can I show them?
_________________
hi~
Back to top
View user's profile Send private message Send e-mail
Nigelg
PostPosted: Tue Dec 21, 2004 5:32 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

You cannot.
As you describe it, the MD Format and CodedCharSetId fields do not actually describe the format and CCSID of the msg. The msg consists of some data in the mainframe CCSID (500, 37?) and also some data in Chinese (unknown CCSID). The data is converted from 500 -> 819 as if all the data is in 500, so the Chinese DBCS characters are converted as if they were SBCS chars in 500, so they are garbled.
If you want to embed Chinese characters in a msg, you must define a user data format, and supply a user-defined convesion routine. The method for doing this is described in the APG, Writing data-conversion exits.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 21, 2004 12:03 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Remember automatic character code translation CCSID is just a translation of the machine representation of the same information.
It does not translate any language. It assumes that the message does not contain any binary data that needs to be conserved from one CCSID to the other.

Now if you represent the chinese part of your message in a different characterset than the rest of your message you need to either split the message with different CCSIDs on each part or use writeUTF and readUTF methods.... and read up a lot on the way MQ handles those.

Enjoy
Back to top
View user's profile Send private message Send e-mail
willhuang_78
PostPosted: Thu Dec 23, 2004 8:54 pm    Post subject: problem has been resolved! Reply with quote

Newbie

Joined: 20 Dec 2004
Posts: 9

Accepting your advances, I have rsolved the intractable problem to me!

thanks a lot!
_________________
hi~
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Question of EBCDIC to ASCII conversion
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.