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 » General IBM MQ Support » How to get queue manager names in a remote system?

Post new topic  Reply to topic Goto page 1, 2  Next
 How to get queue manager names in a remote system? « View previous topic :: View next topic » 
Author Message
mqtablet
PostPosted: Sat May 08, 2010 12:45 am    Post subject: How to get queue manager names in a remote system? Reply with quote

Acolyte

Joined: 09 Jun 2009
Posts: 71

Hi

I have a requirement where I have to get the queue manager names on a system programmatically. I do not want to run the dspmq command and parse the output to a program to filter out the names.

Is there any way where I can do this?
I'm working on C# / Windows / MQ v6.0.

Any help / advice is greatly appreciated. Thanks in advance.

-Tablet.
Back to top
View user's profile Send private message
exerk
PostPosted: Sat May 08, 2010 1:15 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Query the Registry. I don't have a V6.0 build to hand, but for V7.0 it is:

HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVersion\Configuration\QueueManager

The sub-key under that will be a queue manager name (highlighted below), e.g.:

HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVersion\Configuration\QueueManager\AS400
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
mvic
PostPosted: Sat May 08, 2010 2:15 am    Post subject: Re: How to get queue manager names in a remote system? Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

mqtablet wrote:
I have a requirement where I have to get the queue manager names on a system programmatically. I do not want to run the dspmq command and parse the output to a program to filter out the names.

But dspmq is exactly the tool MQ provides for this job. What are the reasons you didn't want to use it?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Sat May 08, 2010 6:23 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Easily done with a good scripting language, like REXX. I use the R4 version, but there are other free rexx compilers available for download.

Visit Mr. Google.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Sun May 09, 2010 3:10 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

bruce2359 wrote:
Easily done with a good scripting language, like REXX. I use the R4 version, but there are other free rexx compilers available for download.

Visit Mr. Google.


If I was doing script programming on Windows I'd use one of the MS native scripting languages, such as Windows Shell Scripting and Windows Scripting Host (WSH), and by extension, VBScript and JScript. These are included as standard since Windows 2000.

Sure, REXX has been about since DOS and Windows 3.1, and it was native to OS/2, and started life as a mainframe assember hack, but it's getting a bit long in the tooth. I did a REXX course about 12 years ago, but never actually did any serious programming in it
_________________
Glenn
Back to top
View user's profile Send private message
AkankshA
PostPosted: Sun May 09, 2010 9:53 pm    Post subject: Re: How to get queue manager names in a remote system? Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

mqtablet wrote:
Hi

I have a requirement where I have to get the queue manager names on a system programmatically. I do not want to run the dspmq command and parse the output to a program to filter out the names.

Is there any way where I can do this?
I'm working on C# / Windows / MQ v6.0.

Any help / advice is greatly appreciated. Thanks in advance.

-Tablet.


but why do you want to avoid using dspmq ??? any specific reason ?
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
gbaddeley
PostPosted: Sun May 09, 2010 11:25 pm    Post subject: Re: How to get queue manager names in a remote system? Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

mqtablet wrote:
Hi

I have a requirement where I have to get the queue manager names on a system programmatically. I do not want to run the dspmq command and parse the output to a program to filter out the names.

Is there any way where I can do this?
I'm working on C# / Windows / MQ v6.0.

Any help / advice is greatly appreciated. Thanks in advance.

-Tablet.


dspmq is the only definitive method of obtaining a list of queue manager names and their status. IBM is at liberty to change at any time the way this information is stored in the Windows Registry or disk files or anywhere else, so don't go parsing MQ internal data in your applications.

It begs the obvious question, why do you want this list? We may be able to offer some helpful advice on alternatives or issues with this requirement.
_________________
Glenn
Back to top
View user's profile Send private message
mqtablet
PostPosted: Mon May 10, 2010 2:24 am    Post subject: Reply with quote

Acolyte

Joined: 09 Jun 2009
Posts: 71

Hi All,

first of all thanks for your valuable time and response.

My requirement is, my organizations application teams need web service, which should display a list of MQ servers and the available queue managers in them, with the connection details.

They are requesting access to MQ boxes, which is forbidden. Hence, the application teams will not have access to run the 'dspmq' command. but they need to get this updated information to connect to the queue manager.

If a connection string is changed, if I open this webservice in a browser and refresh it, it must show the updated connection string.

To build this web service, I requested this.

Thanks,
Tablet.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon May 10, 2010 2:57 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

I like REXX, what's the R4 version?

It's quite ironic to say that's getting long in the tooth, when the standard Unix command line and scripting facilities have remained essentially unchanged since the 1970s!

IBM adds features like the Web System Manager, when I ask if I can use it, the Unix people tell me they haven't installed it.

Why do Unix people like living in the past?
Back to top
View user's profile Send private message
mvic
PostPosted: Mon May 10, 2010 3:02 am    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

mqtablet wrote:
They are requesting access to MQ boxes, which is forbidden. Hence, the application teams will not have access to run the 'dspmq' command. but they need to get this updated information to connect to the queue manager.

Maybe your web service can call dspmq, and return the results somehow?
Back to top
View user's profile Send private message
mqtablet
PostPosted: Mon May 10, 2010 3:48 am    Post subject: Reply with quote

Acolyte

Joined: 09 Jun 2009
Posts: 71

Correct. This is the final option I have. Run the dspmq command from the web service, parse the output to a text processor, format it and display on a web page. This is the final way i'll code, if there are no better way of doing it programmatically.

Thanks to the team for your advice and suggestions.

-Tablet.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon May 10, 2010 4:15 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You shouldn't be auto-discovering this information.

Connection strings and queue manager names shouldn't be changing with any frequency. Well before an application is supposed to go live in production, you should have already had meetings to determine which queue manager or queue managers that application was going to talk to, and have then provided the fixed connection information.

If you are actually allowing your app teams to decide this for themselves, and you want to provide them a webpage to look it up, then it should be reading information from a configuration repository of some kind, like a file or a database or something, that is populated and updated through a people-task rather than automatically.

Every time you create a new queue manager on a machine, or add a new listener to a queue manager, update the configuration repository.

You should be keeping track of this anyway!
Back to top
View user's profile Send private message
fatherjack
PostPosted: Mon May 10, 2010 4:31 am    Post subject: Reply with quote

Knight

Joined: 14 Apr 2010
Posts: 522
Location: Craggy Island

mqjeff wrote:
You shouldn't be auto-discovering this information.


Absolutely. Surely if you're changing connection details this is a planned exercise and will have been communicated to all stakeholders well in advance so they can plan their appropriate actions. If not, what other facilities are you going to have to provide - a webservice so the developers can check where you've moved their application queues to or to check you haven't deleted them
_________________
Never let the facts get in the way of a good theory.
Back to top
View user's profile Send private message
SAFraser
PostPosted: Mon May 10, 2010 8:51 am    Post subject: Reply with quote

Shaman

Joined: 22 Oct 2003
Posts: 742
Location: Austin, Texas, USA

I feel compelled to add my support to comments from mqjeff and fatherjack.

At our site, even with BlockIP2, OAM security, and a homegrown WMB message flow that "authenticates" connection attempts -- even with all this, we struggle with improper client connections to our queue managers.

I shudder to think of developers viewing a website that lets them choose their own connection details. Seriously, I am actually shuddering at this very moment.

Back to top
View user's profile Send private message
Vitor
PostPosted: Mon May 10, 2010 9:32 am    Post subject: Reply with quote

Grand High Poobah

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

SAFraser wrote:
I shudder to think of developers viewing a website that lets them choose their own connection details. Seriously, I am actually shuddering at this very moment.



And I am reaching instinctively for a trout.

I can only endorse the comments of my associates. One of the key benefits of using WMQ is the disassociation of the application from the messaaging infrastructure. In the scenario you're describing there are serious risks as well as a lot of unnecessary work.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General IBM MQ Support » How to get queue manager names in a remote system?
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.