Author |
Message
|
IanB |
Posted: Fri Oct 13, 2006 5:31 am Post subject: PCF - MQCMD_INQUIRE_Q_STATUS issue |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
Hi,
I've just started a new project working with MQ for the first time. I'm hoping to use the above PCF message to monitor the queues on our MQ server.
My language of choice is C#.
I've successfully submitted a request and received back an array containing all my queues and a bunch of parameters. I have two issues though.
First, I was expecting to get back a lot more information than I am getting. Currently I get 5 parameters back for each queue, but I was expecting the full list.
Second I'm not too sure how to get the parameters out in a meaningful way. GetParameter, GetStringParameter et al fail regardless of what I pass in as the parameter. pcfResponses[0].GetStringParameterValue (IBM.WMQ.MQC.MQCA_Q_NAME) fails as an example even though I can see that parameter in the Locals window.
IBM.WMQ.PCF.PCFMessage pfcMessage = new IBM.WMQ.PCF.PCFMessage(IBM.WMQ.PCF.CMQCFC.MQCMD_INQUIRE_Q_STATUS);
pfcMessage.AddParameter(IBM.WMQ.MQC.MQCA_Q_NAME,"*");
pfcMessage.AddParameter(IBM.WMQ.PCF.CMQCFC.MQIACF_Q_STATUS_ATTRS,IBM.WMQ.PCF.CMQCFC.MQIACF_ALL);
IBM.WMQ.PCF.PCFMessageAgent agent = new IBM.WMQ.PCF.PCFMessageAgent(manager);
IBM.WMQ.PCF.PCFMessage[] pcfResponses = agent.Send(pfcMessage);
Thank you for your time.
Ian |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 13, 2006 5:37 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You may be running into issues with what the undocumented IBM.WMQ.PCF classes support.
You can see if you get back different information if you build the PCF message manually, and process the response manually.
Or you can look at using the MQAI. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
IanB |
Posted: Fri Oct 13, 2006 5:50 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
jefflowrey wrote: |
You may be running into issues with what the undocumented IBM.WMQ.PCF classes support.
You can see if you get back different information if you build the PCF message manually, and process the response manually.
Or you can look at using the MQAI. |
Yes I noticed the documentation was a little erm missing
I'll have a go at hand crafting a message and investigate MQAI. I've been reading publib. I had a look on publib, but can't find an explanation of exactly what the message should look like. I assume I create a normal MQMessage and use the writexxx methods to append the structure? Any tips in that area would be greatly appreciated.
Thanks for the swift reply
Ian |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 13, 2006 5:56 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
IanB wrote: |
I assume I create a normal MQMessage and use the writexxx methods to append the structure? |
I assume so too.
IanB wrote: |
Any tips in that area would be greatly appreciated. |
The Perl API is excellent for PCF monitoring. The Java Support Pack is pretty good, too. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
IanB |
Posted: Fri Oct 13, 2006 6:01 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
jefflowrey wrote: |
IanB wrote: |
I assume I create a normal MQMessage and use the writexxx methods to append the structure? |
I assume so too.
IanB wrote: |
Any tips in that area would be greatly appreciated. |
The Perl API is excellent for PCF monitoring. The Java Support Pack is pretty good, too. |
Never touched Perl, but I can have a play with the Java version.
Cheers
Ian |
|
Back to top |
|
 |
IanB |
Posted: Fri Oct 13, 2006 6:42 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
Well I can't use Java, MQAI doesn't seem to be part of the dotnet implementation and the dotnet PFCMessage either doesn't work or requires some sort of arcane knowledge I'm not in possession of.
 |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 13, 2006 6:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can get at MQAI through the ActiveX interface. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
IanB |
Posted: Fri Oct 13, 2006 7:09 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
jefflowrey wrote: |
You can get at MQAI through the ActiveX interface. |
Sold! Thank you! |
|
Back to top |
|
 |
IanB |
Posted: Fri Oct 13, 2006 7:51 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
Me again. Looking through the object browser, I'm not seeing any of the methods detailed on publib or anything analagous. There are a few constants fo the bags, but no addbag method or similar.
Cheers
Ian |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 13, 2006 7:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Did you point at the MQAX**** dll? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
IanB |
Posted: Fri Oct 13, 2006 7:58 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
jefflowrey wrote: |
Did you point at the MQAX**** dll? |
Yep, I have a reference to C:\program files\IBM\websphere MQ\bin\mqax200.dll version 5.300.1200.5342
Ian |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 13, 2006 8:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
IanB |
Posted: Fri Oct 13, 2006 8:13 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
That's the problem, MQBag doesn't exist in that DLL, I have no idea what's going. I'll read throught the above though just in case.
I've managed to get one of the samples that uses declare's to the C api working (and even that fought back) so I might go that way for the time being.
Thanks for all your help.
Ian |
|
Back to top |
|
 |
IanB |
Posted: Fri Oct 13, 2006 8:17 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
Interestingly, I've just searched the registry and there are no entries for MQBag at all, so I've not got anything registered that contains that class :/ |
|
Back to top |
|
 |
IanB |
Posted: Fri Oct 13, 2006 8:24 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
Ah the mystery of the missing class has been discussed here before
Previous thread
Not sure if the final post is relevant? I don't have direct access to the server to check.. |
|
Back to top |
|
 |
|