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 » EBCDIC/ASCII Question

Post new topic  Reply to topic
 EBCDIC/ASCII Question « View previous topic :: View next topic » 
Author Message
speediii
PostPosted: Mon May 08, 2006 1:21 am    Post subject: EBCDIC/ASCII Question Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Mon May 08, 2006 2:47 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Mon May 08, 2006 5:02 am    Post subject: Reply with quote

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
View user's profile Send private message
speediii
PostPosted: Mon May 08, 2006 6:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » EBCDIC/ASCII Question
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.