Author |
Message
|
international |
Posted: Tue Jan 15, 2013 7:18 am Post subject: Getting MQ version, release etc programatically |
|
|
Apprentice
Joined: 19 Jun 2006 Posts: 37
|
Hi,
is there a MQ/Java function call which returns the version etc of the connected qmgr?
cheers
Tony |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jan 15, 2013 7:25 am Post subject: Re: Getting MQ version, release etc programatically |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
international wrote: |
is there a MQ/Java function call which returns the version etc of the connected qmgr? |
Do you mean the version of the queue manager to which the application has a client connection?
a) No
b) Why? It makes no difference to the application and, if the application is attempting to use version specific features, I put it to you that the version of the MQ client in use is of greater impact than the client side code.
Or don't you mean that? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jan 15, 2013 7:30 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The main MQ client APIS do not provide this level of information, because it is only relevant to administrative applications, and not to business applications.
There are a variety of PCF messages that can be sent by a client application. These form an administrative API that is, for example, used by MQ Explorer.
If you can find the relevant information available from MQ explorer when MQ Explorer is using a client connection, it is reasonable to expect that there is a PCF message that will return the same information.
It is not reasonable to expect that some random client application will be able to issue PCF messages, nor be authorized to do so. |
|
Back to top |
|
 |
international |
Posted: Tue Jan 15, 2013 7:54 am Post subject: |
|
|
Apprentice
Joined: 19 Jun 2006 Posts: 37
|
Phew, luckily for me this is indeed an admin utility
I'll have another trawl thru the PCF values
cheers
Tony |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jan 15, 2013 7:56 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
international wrote: |
Phew, luckily for me this is indeed an admin utility |
If you need an admin utility to tell you what version of software you're using where, you may want to tighten up your installation control processes just a hair.
Especially as this utility can't list all the servers on which WMQ has been installed, for which you require manual records. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
international |
Posted: Tue Jan 15, 2013 8:38 am Post subject: |
|
|
Apprentice
Joined: 19 Jun 2006 Posts: 37
|
For any subsequent forum searchers, the answer is use PCF and ask for MQIA_COMMAND_LEVEL. Just like in DIS QMGR ALL, it returns a number such as 600, 710 (MQ 6.0.0, 7.1.0 respectively)
cheers
Tony |
|
Back to top |
|
 |
gbaddeley |
Posted: Tue Jan 15, 2013 2:34 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Without using PCF, an application program can open the Queue Manager object for inquiry (eg. in C, ObjDesc.ObjectType = MQOT_Q_MGR; OpenOpts = MQOO_INQUIRE + MQOO_FAIL_IF_QUIESCING; MQOPEN....) and then inquire (using MQINQ) on the integer value of MQIA_COMMAND_LEVEL.
The need for a typical application to know this information is highly questionable. _________________ Glenn |
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Jan 16, 2013 2:11 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
All,
There is even an simplier solution as long as the 3 digit release number is ok (vs the 4 digit release). i.e. 700, 701, 710 or 750
Code: |
MQQueueManager qMgr = new MQQueueManager("MQA1");
int cmdLevel = qMgr.getCommandLevel(); |
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
|