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 » User Exits » WMQv7.5 message properties in an exit

Post new topic  Reply to topic
 WMQv7.5 message properties in an exit « View previous topic :: View next topic » 
Author Message
Vitor
PostPosted: Wed Feb 26, 2014 12:11 pm    Post subject: WMQv7.5 message properties in an exit Reply with quote

Grand High Poobah

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

So let's accept as a starting point that user exits are the court of last resort and any sane person avoids their use at all costs.

If I wanted to have an API exit invoked before the MQPut or MQPut1 calls and that exit wanted to examine the message properties associated with a message (for those people who don't read subject lines this is WMQv7.5), could it do this? Are these expressed to the exit as part of the buffer or in some other area? I've looked at the parameters associated with those exits are was distressed not to see pProperties as well as pBuffer.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Feb 26, 2014 1:29 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

http://pic.dhe.ibm.com/infocenter/wmqv7/v7r5/topic/com.ibm.mq.ref.dev.doc/q109610_.htm

talks about ExitMsgHandle in context of a GET.

So you might be able to get the message handle from the MQAXP structure given to a PUT exit.
Back to top
View user's profile Send private message
markt
PostPosted: Thu Feb 27, 2014 1:05 am    Post subject: Reply with quote

Knight

Joined: 14 May 2002
Posts: 502

For PUT, the exit is passed the MQPMO which in turn contains MsgHandles.

There's also the MQBUFMH and MQMHBUF calls that convert between a handle and flattened form.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Thu Feb 27, 2014 4:56 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3252
Location: London, ON Canada

Hi,

Yes, it is pretty straightforward. I did this in MQ Auditor. You grab the handle from the PMO (version 3 or higher) then loop through the message properties and do what you need with them. Remember to check the 'Type' of property value before you use it (i.e. MQTYPE_STRING, MQTYPE_INT32, etc.).

Hope that helps.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » User Exits » WMQv7.5 message properties in an exit
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.