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 » API exit - queue name extract

Post new topic  Reply to topic
 API exit - queue name extract « View previous topic :: View next topic » 
Author Message
luvmq
PostPosted: Sat Jul 17, 2004 6:01 pm    Post subject: API exit - queue name extract Reply with quote

Newbie

Joined: 26 May 2004
Posts: 7

Hi,

Can someone help me extract the queue name from the following API functions
void MQENTRY GetBefore ( PMQAXP pExitParms
, PMQAXC pExitContext
, PMQHCONN pHconn
, PMQHOBJ pHobj
, PPMQMD ppMsgDesc
, PPMQGMO ppGetMsgOpts
, PMQLONG pBufferLength
, PPMQVOID ppBuffer
, PPMQLONG ppDataLength
, PMQLONG pCompCode
, PMQLONG pReason
)

void MQENTRY InqBefore ( PMQAXP pExitParms
, PMQAXC pExitContext
, PMQHCONN pHconn
, PMQHOBJ pHobj
, PMQLONG pSelectorCount
, PPMQLONG ppSelectors
, PMQLONG pIntAttrCount
, PPMQLONG ppIntAttrs
, PMQLONG pCharAttrLength
, PPMQCHAR ppCharAttrs
, PMQLONG pCompCode
, PMQLONG pReason
)
void MQENTRY PutBefore ( PMQAXP pExitParms
, PMQAXC pExitContext
, PMQHCONN pHconn
, PMQHOBJ pHobj
, PPMQMD ppMsgDesc
, PPMQPMO ppPutMsgOpts
, PMQLONG pBufferLength
, PPMQVOID ppBuffer
, PMQLONG pCompCode
, PMQLONG pReason
)
I need to log in the queue name and the user id . I was able to get the userid but not able to get the queue name.

Thanks
Back to top
View user's profile Send private message MSN Messenger
RogerLacroix
PostPosted: Sat Jul 17, 2004 9:22 pm    Post subject: Reply with quote

Jedi Knight

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

Standard MQ programming stuff.

In a normal MQOpen, how do you specify the queue name? Hint: Look in PMQHOBJ.

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
luvmq
PostPosted: Mon Jul 19, 2004 4:36 am    Post subject: Reply with quote

Newbie

Joined: 26 May 2004
Posts: 7

Thanks Roger, I think I'm missing something here. I do understand that MQHOBJ points to the queue that is opened. I was able to extract the queue name for the OPEN API since I would take it directly from MQOD. Since MQHOBJ is a handle I wasn't sure how to code in C and extract the queue name. I guess I wasn't clear enough. Hope this explains where I'm exactly facing an issue.

Thanks.
Back to top
View user's profile Send private message MSN Messenger
clindsey
PostPosted: Mon Jul 19, 2004 5:33 am    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

You can only get the queue name during open before and after.
You have to store it as an association to the object handle and then do a lookup when you need it for the other api calls.

I can make this easy for you. I implemented this technique in the mirrorq sample. Download mirrorq1_win.zip from http://www.developer.ibm.com/tech/sampmq.html and look at the mirrorq.c source code. It uses a link list to save the object handles and queue names. You should be able to reuse much of this code.

Charlie
Back to top
View user's profile Send private message
luvmq
PostPosted: Tue Jul 20, 2004 11:51 am    Post subject: Reply with quote

Newbie

Joined: 26 May 2004
Posts: 7

Thanks Charlie,

The sample code helped a lot.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » API exit - queue name extract
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.