Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enumerating QueueManagers and Queues 1

Status
Not open for further replies.

Hexonx

Programmer
Jan 10, 2001
102
US
Anyone know how to enumerate all QueueManagers on the local machine, and the Queues each manager owns? I'm writing a test harness to generate messages and want to be able to select the QM and Q to send to.

TIA
 
Havent done this myself, but here are a few suggstions.

if you are using MQ client, you could use client channel table.

if you are using MQ server, then here are some of the options.
1) In your app, issue a system command and call MQ command DSPMQ which displays a list of queue managers on the local machine. Copy this into either a local buffer or a file and parse the qm name from it.
2) Similarly call saveqmgr from your system command and repeat the same process as in step 1 to get all the local queues.

Good luck.



Cheers
KK
 
Do you have any sample code for how to connect
to other queue managers from MQ Server?

Thanks

LVB
 
What language? I have some VB.NET programs that do it but really it isn't a big deal in any language.

What you need is to do in VB.NET is set the MQ Environment variables. These are:

MQEnvironment.Hostname
MQEnvironment.Channel

If you are on a Server you can find out what Queue Managers are on the server by issuing the DSPMQ command.

Hope this helps

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top