|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
EBCDIC/ASCII Question |
« View previous topic :: View next topic » |
Author |
Message
|
speediii |
Posted: Mon May 08, 2006 1:21 am Post subject: EBCDIC/ASCII Question |
|
|
Novice
Joined: 11 Apr 2006 Posts: 19
|
I have a small component routing messages between many back office applications to a Solaris application (QM on Solaris machine). Some messages are in Ascii and others in EBCDIC and I need to maintain this when my app Get's and PUT's MQ messages.
I am confused about the settings I need in my Java MQ application to make this work:
1. In my GET options I do NOT set MQC.MQGMO_CONVERT.
2. I use readString() to get the message content
3. I use the original MQMessage Object for the PUT, and the modified message content is written using clearMessage() followed by writeString.
The MQ Messages I PUT seem to have all the correct settings - CCSID 500, and Encoding 785.
But the tester said he had to change the Solaris application settings from EBCDIC to ASCII to get it to work. We can't make similar changes on the legacy back office applications. I presume therefore I'm doing some conversion when the message is copied to the queue by my app?
Could someone please point me in the right direction here, and we don't really want to put conversion on the channels as we'd prefer a simple deployment and leave everything as it is.
Many thanks in advance for any advice
Lee |
|
Back to top |
|
 |
zpat |
Posted: Mon May 08, 2006 2:47 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
If all applications used MQGMO_CONVERT then there would be no need to maintain the original CCSID.
That is how things should be done.
However, what you seem to be doing is setting/leaving the CCSID as ECBDIC but supplying ASCII data in the message.
MQPUT does not convert data. You must correctly describe it.
I suspect the readstring method or writestring is changing something - can you not use readbytes and writebytes (or something like that I am not a Java programmer)?
Inspect the messages on the queue to see what is happening. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon May 08, 2006 5:02 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Why are you even using readString in the first place? You don't care about the data at all, if you're doing a "routing" application.
So use readBytes and writeBytes. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
speediii |
Posted: Mon May 08, 2006 6:26 am Post subject: |
|
|
Novice
Joined: 11 Apr 2006 Posts: 19
|
>Why are you even using readString in the first place?
Actually, I route the original message but I'm also creating a copy to another queue with a slightly different content, so I am modifying the message.
readString and writeString seem to read in the CCSID supplied and converts to Unicode, and writes the data back "...converting it to the codeset identified by the characterSet member variable...."
I've checked the HEX output of the content I write, and it seems to be EBCDIC so I've asked the tester to re-test.
I think therefore it's working OK, but it's good to hear alternative ideas of how this could/should be done,
Thanks
Lee |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|