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 » General Discussion » Message Identifier format conversion from ASCII to EBCDIC

Post new topic  Reply to topic
 Message Identifier format conversion from ASCII to EBCDIC « View previous topic :: View next topic » 
Author Message
maxyen
PostPosted: Sat Feb 04, 2006 2:46 pm    Post subject: Message Identifier format conversion from ASCII to EBCDIC Reply with quote

Newbie

Joined: 08 Aug 2002
Posts: 8

Our application is receiving ascii in the message identifier, however the AS400 application polling the queue cannot read the message indentifier in ASCII, we need it in EBCDIC. How can this be done? Is there an Mq Setting to convert the message id format from ASCII to EBCDIC?

Any suggestions would be greatly appreciated.

Thanks in advance.

M.Y
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Sat Feb 04, 2006 3:35 pm    Post subject: Re: Message Identifier format conversion from ASCII to EBCDI Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

maxyen wrote:
Is there an Mq Setting to convert the message id format from ASCII to EBCDIC?

No. The Msg ID, Crl ID and Act Token are bytes fields, and are not converted. Its bad design to treat those fields as anything other than a byte stream.

If you must convert (and you really shouldn't be going down this path, do a search on this site for message ID and convert), you will have to write your own conversion routine for that field.

Why do you want to do this?
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
maxyen
PostPosted: Sat Feb 04, 2006 6:59 pm    Post subject: Reply with quote

Newbie

Joined: 08 Aug 2002
Posts: 8

Well, our queue manager is on the AS/400 and we are receiving messages (xml and attachments) from a Windows box. We are looking for specific message in the queue and the way we are doing it is to retrieve message from the queue with a specific message id (xml) and retrieve attachments ultimately. The issue is Windows sent the "key" specified in the message id in ASCII and AS/400 understands EBCDIC. I thought the main purpose of the messsage id is to enable filtering of messages. Am I using it incorrectly and are there other alternatives?

Thanks.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Feb 04, 2006 8:20 pm    Post subject: Reply with quote

Grand High Poobah

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

maxyen wrote:
I thought the main purpose of the messsage id is to enable filtering of messages. Am I using it incorrectly and are there other alternatives?

You are quite right here however you're as well under some misconception.

The messageId/CorrelationId are not "Human Identifiable" fields. They are to be compared byte by byte and treated as byte array.

They are part of the "anonymous" identifier pattern.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
HubertKleinmanns
PostPosted: Mon Feb 06, 2006 10:29 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

The sense of the msgId and correlId is, to correlate a question and its answer. In this case you would create a request message and remember the msgId. The requested application would copy the msgId into the correlId of an answer (reply) message and sends it back. The requester now can "find" the answer to its question. In the scenario above there is no need, to convert the msgId.

When to want to "filter" message ist only works, when the created msgId is of a readable format on the target QMgr. A "trick" would be, to set the msg ID on your windows system to values, which are unreadable on windows, but on AS/400 they "look like" readable characters.

Another (and better) solution would be, to put your "filter attribute" into the message data. When you use XML it should be quite easy, to add an additional field which contains the filter attribute.

Your applications should always read every message and filter the messages itself. May be, you put the messages to a database and put an index or key onto your filter attributes.
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
maxyen
PostPosted: Mon Feb 06, 2006 7:32 pm    Post subject: Reply with quote

Newbie

Joined: 08 Aug 2002
Posts: 8

Thanks, we had it working by converting EBCDIC to ASCII on the get. Now, we can read the message id and are receiving readable xml file but pdf and jpg are not readable. We tried combinations of MQSTR and channel conversion (yes/no) without success.

I'm not sure what to try next. I noticed the message has an encoding cp437 but the sender informed us that they are not using any encoding for the put; may be it's just the default.

Any suggestions?
Back to top
View user's profile Send private message
Srinivasan
PostPosted: Mon Feb 06, 2006 9:37 pm    Post subject: Reply with quote

Apprentice

Joined: 12 Jul 2005
Posts: 41
Location: Chennai

http://czyborra.com/charsets/codepages.html

Find the code pages in the above link. The default code page for the sending system ishould be CP437. Hope this helps for you.
_________________
Srinivasan for MQ discussion
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Message Identifier format conversion from ASCII to EBCDIC
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.