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 API Support » Need help understanding MQGMO_CONVERT

Post new topic  Reply to topic
 Need help understanding MQGMO_CONVERT « View previous topic :: View next topic » 
Author Message
cmkeller
PostPosted: Wed Apr 01, 2009 11:12 am    Post subject: Need help understanding MQGMO_CONVERT Reply with quote

Apprentice

Joined: 09 Jan 2005
Posts: 41
Location: Queens, NY

I am trying to understand the usage of MQGMO_CONVERT, as my local (ASCII) application seems to be receiving messages from someone using the EBCDIC character set. I'm finding the documentation to be confusing. Can someone please tell me in simple English:

1) If I specify MQGMO_CONVERT, does MQSeries do the conversion itself, or is this just to specify that an "exit" DLL will convert the text before returning it as part of the GET call, but I also need to supply the exit?
2) Is the convert option dependent on the good graces of the sender to specify the character set? Or is the character set always specified on the message?
3) Where exactly (in my app) do I set the character set and the encoding when I'm creating an ImqGetOptions flag set? Are those values just more bitwise |s? I'm used to the flags for Get options needing to start with MQGMO_.
4) Is there a significant performance hit when using the convert option? Will there be many fewer messages taken off the queue in a given time period?

Thank you very much.
_________________
Chaim Mattis Keller
Shadow Financial Services Corp
ckeller@shadowfinancial.com
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Wed Apr 01, 2009 11:43 am    Post subject: Re: Need help understanding MQGMO_CONVERT Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

cmkeller wrote:
1) If I specify MQGMO_CONVERT, does MQSeries do the conversion itself, or is this just to specify that an "exit" DLL will convert the text before returning it as part of the GET call, but I also need to supply the exit?


Only if the message format (as specified in the MQMD) has not been described as a string by the sender. If a custom format has been specified, a custom conversion will need to be supplied.

cmkeller wrote:
2) Is the convert option dependent on the good graces of the sender to specify the character set? Or is the character set always specified on the message?


The message encoding defaults to that of the sending queue manager, but can be overwritten by the sender.

cmkeller wrote:
3) Where exactly (in my app) do I set the character set and the encoding when I'm creating an ImqGetOptions flag set? Are those values just more bitwise |s? I'm used to the flags for Get options needing to start with MQGMO_.


Why are you specifying them and not using the default set & encoding?

cmkeller wrote:
4) Is there a significant performance hit when using the convert option? Will there be many fewer messages taken off the queue in a given time period?


The default string conversion has no realistic performance impact. If you're using a custom conversion it depends on the performance of your custom routine.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
cmkeller
PostPosted: Wed Apr 01, 2009 1:39 pm    Post subject: Reply with quote

Apprentice

Joined: 09 Jan 2005
Posts: 41
Location: Queens, NY

Quote:
Why are you specifying them and not using the default set & encoding?


Because the documentation on MQGMO_CONVERT mentioned those settings, I wasn't sure where that belonged.
_________________
Chaim Mattis Keller
Shadow Financial Services Corp
ckeller@shadowfinancial.com
Back to top
View user's profile Send private message Send e-mail
PeterPotkay
PostPosted: Wed Apr 01, 2009 2:19 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

http://www-01.ibm.com/support/docview.wss?uid=swg24000645&rs=260

Quote:

MA07: MQSeries data conversion White Paper and samples

Abstract
The SupportPac consists of a White Paper, providing an overview of MQSeries Data Conversion and a set of C language programming examples.


Download Description
The best means of providing for Data Conversion (e.g. ASCII/EBCDIC), for messages flowing between unlike platforms, is often a source of confusion for newcomers to MQSeries.

The SupportPac consists of a White Paper, providing an overview of MQSeries Data Conversion. There is also an accompanying set of C language programming examples.

POSSIBLE USES

The SupportPac is relevant to all MQSeries users who wish to flow messages between platforms of unlike architectures e.g. with different character or integer representations.

_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Wed Apr 01, 2009 4:54 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

See also http://www.ibm.com/support/docview.wss?uid=swg27005729

In a nut shell, the requirements for automatic conversion of MQ messages across different character sets are:

1) Putting app sets MQMD.Format to MQFMT_STRING (the literal "MQSTR "). Optionally sets MQMD.CodedCharSetId. Usually the default value is OK.

2) Getting app optionally sets MQMD.CodedCharSetId prior to the MQGET. Usually the default value is OK. Includes MQGMO_CONVERT in the Get Message Options.

QED.

MQ does the conversion when passing the message from the queue to the buffer in the getting app.

MQ can also convert messages when they are transmitted across channels which have the CONVERT(YES) parameter set. This is not recommended. I have seen it used when badly writting getting apps forgot to specify MQGMO_CONVERT and it was too hard to change the app.

Be careful on z/OS as the MQ default ccsid for EBCDIC may not agree with the EBCDIC ccsid that the app and db is using. Some characters may not be converted as expected.
_________________
Glenn
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 API Support » Need help understanding MQGMO_CONVERT
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.