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 IBM MQ Support » Conversion - application controlled?

Post new topic  Reply to topic
 Conversion - application controlled? « View previous topic :: View next topic » 
Author Message
misnibm
PostPosted: Thu May 04, 2006 5:47 pm    Post subject: Conversion - application controlled? Reply with quote

Newbie

Joined: 04 May 2006
Posts: 2
Location: New York

Need some help getting straightened out about data conversions after reading the MQ documention( too many "may"s and "if"s)....

I've read the following statement from the MQ docs:

"Application data is converted within an application program when the
MQGMO_CONVERT option is specified in the Options field of the MQGMO
structure passed to an MQGET call, and all of the following are true:
-The CodedCharSetId or Encoding fields set in the MQMD structure associated with the message on the queue differ from the CodedCharSetId or Encoding fields set in the MQMD structure specified on the MQGET call."

My question is, can you specify the CCSID and encoding fields that you want the data to be converted to, irregardless of the OS's default encoding?

My thinking of conversion process..... We have an application which does an MQGET. This application sits on an AIX box version 5.3 with a default encoding of 8859-1. We wish to receive data from other systems, with various CCSIDs and encodings. The sending system will be populate the MQMD with it's CCSID and encoding, of type String. This will tell the MQ Manager (on receiving side) what type of data it is to convert from. At runtime, we wish to have the receiving application which is doing the MQGET to convert the data to UTF-8. So, I'm thinking we can set the CCSID to 1208 in the MQMD and have the MQ Manager do the conversions.

Am I in the right ballpark? Is it this simple (obviously, that question is from a newbie) But is that basically it?

Thanks for reading...
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu May 04, 2006 8:47 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can have the qmgr do the conversion in the following situations
1) The message format is set to some format that the queue manager can understand (i.e., like to a formatting extensinon - MQFMT_STRING is good because it's well-known and presupplied), AND Encoding and CCSID actually match the message data itself, AND the receiving program specifies MQGMO_CONVERT.

OR
2) the format and etc. are known as above, AND the message passes through a channel that has CONVERT(yes) set.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
misnibm
PostPosted: Fri May 05, 2006 3:48 am    Post subject: Reply with quote

Newbie

Joined: 04 May 2006
Posts: 2
Location: New York

Thanks for the quick response. I'm pursuing the first option you mentioned.

The problem with my understanding is "AND Encoding and CCSID actually match the message data itself".

We'll set the MQMD.CodedCharSetId to MQCCSI_Q_MGR while doing the MQPUT. This sets the CCSID in the message descriptor. This CCSID should match the code page of the message data.

When doing the MQGET, I've read you can set MQMD.CodedCharSetId to the CCSID that you want the data converted to. And as you stated, specify the MQGMO_CONVERT as one of the MQGMO.Options.

Just want to understand this, I'm also thinking of just letting MQ transport the message as a byte array and letting the application handle the conversions. But I've been told by some MQ folks that its easy, but couldn't explain it to me.
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 » General IBM MQ Support » Conversion - application controlled?
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.