|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How do you get names of objects with VB? |
« View previous topic :: View next topic » |
Author |
Message
|
EOTIII |
Posted: Tue May 07, 2002 11:32 am Post subject: |
|
|
 Newbie
Joined: 28 Feb 2002 Posts: 8 Location: Richmond, VA
|
I am using VB 6 and MQAX200. I want to get all the names of the queues on the particular queue manager that I am connected. I am writing a tool to monitor queue depths trigger depths etc and I do not want to hard code the names of the queues. Is there a way to programmatically get these names?
Thanks.
[ This Message was edited by: EOTIII on 2002-05-07 12:58 ] |
|
Back to top |
|
 |
MillsPerry |
Posted: Tue May 07, 2002 1:07 pm Post subject: |
|
|
 Acolyte
Joined: 08 Oct 2001 Posts: 59 Location: ZyQuest, inc.
|
You need to use a different API, called MQ Administrative Interface or MQAI. The documentation included with the MQ client contains an example written in C. The location is "MQSeries Administration Interface Programming Guide and Reference", Chapter 6. Examples of using the MQAI
One problem that I haven't solved yet is that this interface will fail with a security error unless you are authorized to view all the queues on your queue manager. My client doesn't want to authorize all employees to display system queues, so that leaves many people who won't get a list of queues. |
|
Back to top |
|
 |
oz1ccg |
Posted: Tue May 07, 2002 11:56 pm Post subject: |
|
|
 Yatiri
Joined: 10 Feb 2002 Posts: 628 Location: Denmark
|
What about trying to put a "display Queue command" on SYSTEM.ADMIN.COMMAND.QUEUE using PCF-commands, and the do normal MQGET from the reply queue.
I don't know if it solve your security problem, but as far as I see it, it might because it's up to the command server to do the trick instead of your user_task.
_________________ Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT. |
|
Back to top |
|
 |
EOTIII |
Posted: Thu May 09, 2002 8:54 am Post subject: |
|
|
 Newbie
Joined: 28 Feb 2002 Posts: 8 Location: Richmond, VA
|
I am using the MQAI with VB. it works fine except for the following function:
mqInquireString qAttrsBag, MQCA_Q_NAME, 0, MQ_Q_NAME_LENGTH, qName, qNameLength, Null Here , CompCode, Reason
I got this from the MQAI progroming & Reference guide. The example was in C. requires a Null to be sent at "Null Here". I am not able to make it work by using the key word Null. It expects a long. If I put a number in it fails with cc=2 rc=2004. Any ideas? I have been able to get other attributes to waork. |
|
Back to top |
|
 |
MillsPerry |
Posted: Thu May 09, 2002 1:17 pm Post subject: |
|
|
 Acolyte
Joined: 08 Oct 2001 Posts: 59 Location: ZyQuest, inc.
|
I use this code:
mqInquireString systemBag, MQCA_Q_NAME, 0, MQ_Q_NAME_LENGTH, strQName, _
intQNameLength, 0, mvarCompletionCode, mvarReasonCode
If you want a VB class module that gets you a list of queue names, give me your e-mail address. |
|
Back to top |
|
 |
EOTIII |
Posted: Fri May 10, 2002 4:21 am Post subject: |
|
|
 Newbie
Joined: 28 Feb 2002 Posts: 8 Location: Richmond, VA
|
|
Back to top |
|
 |
EOTIII |
Posted: Fri May 10, 2002 11:52 am Post subject: |
|
|
 Newbie
Joined: 28 Feb 2002 Posts: 8 Location: Richmond, VA
|
I got the queue info working just fine now. I am trying to display channel info (type,status etc.) using MQIA. I can't find any code examples. Does anyone have any? I'm using VB but C examples will help.
Thanks. |
|
Back to top |
|
 |
dpchiesa |
Posted: Tue Jun 04, 2002 12:56 pm Post subject: MQ Admin Prog Guide and Ref + MQAI |
|
|
 Apprentice
Joined: 29 May 2002 Posts: 46
|
Click here for the
MQSeries Administration Interface Programming Guide and Reference
http://www-3.ibm.com/software/ts/mqseries/library/manuals99/csqzat/csqzat.htm
There are examples but not many of them.
I am having some limited success with MQAI in VB.NET. I can retrieve Q_NAME, CURRENT_DEPTH, and MAX_DEPTH for all local queues, but cannot retrieve HIGH_DEPTH or MSG_DEQ_COUNT. I get cc=2, rc=3008 (COMMAND_FAILED). The embedded error rc is 2067 (MQRC_SELECTOR_ERROR).
Any ideas? I am going to RTFM but is there a limit on the number of attrs one can request in a responseBag ? Is this the security problem others have described in their posts about MQAI ?
(ps: when I run MQSeries Explorer, I can see the details of only 3 queues: default, postcard, and clq_default_hostname. When I run my MQAI test, if I specify only Q_NAME, CURRENT_DEPTH, AND MAX_DEPTH, then I get the results for every local queue. ?? )
-D _________________ -dpchiesa |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|