|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
PCF get qmanager details |
« View previous topic :: View next topic » |
Author |
Message
|
vasilev |
Posted: Tue Oct 22, 2019 12:19 am Post subject: PCF get qmanager details |
|
|
 Acolyte
Joined: 31 Oct 2014 Posts: 71 Location: Germany
|
Hello all,
i am trying to get some details of the qmanager:
CCSID
VERSION
QMID
SSLKEYR
and so on.
i have searched and find one topic, cannot find how to read these ParameterValues.
this is the code:
Code: |
PCFMessage msg = new PCFMessage (CMQCFC.MQCMD_INQUIRE_CLUSTER_Q_MGR);
msg.addParameter (CMQC.MQCA_CLUSTER_Q_MGR_NAME, "*");
PCFMessage[] responses = a.send(msg); |
here when i debug, i see it is under MQCFST and called MQCA_VERSION - for the version for example, but when i try to get it:
Code: |
String [] names = (String []) responses [0].getParameterValue (MQCFST.MQCA_VERSION); |
then i got exception. or error.
can you help me.
thanks ! |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Oct 22, 2019 2:44 am Post subject: Re: PCF get qmanager details |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
vasilev wrote: |
Hello all,
i am trying to get some details of the qmanager:
CCSID
VERSION
QMID
SSLKEYR
and so on.
i have searched and find one topic, cannot find how to read these ParameterValues.
this is the code:
Code: |
PCFMessage msg = new PCFMessage (CMQCFC.MQCMD_INQUIRE_CLUSTER_Q_MGR);
msg.addParameter (CMQC.MQCA_CLUSTER_Q_MGR_NAME, "*");
PCFMessage[] responses = a.send(msg); |
here when i debug, i see it is under MQCFST and called MQCA_VERSION - for the version for example, but when i try to get it:
Code: |
String [] names = (String []) responses [0].getParameterValue (MQCFST.MQCA_VERSION); |
then i got exception. or error.
can you help me.
thanks ! |
Too much stuff on your responses line.
Treat the responses one by one.
off the cuff
Code: |
String value = responses[0].getParameterValue(MQConstants.MQCA_VERSION); |
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
vasilev |
Posted: Tue Oct 22, 2019 5:11 am Post subject: |
|
|
 Acolyte
Joined: 31 Oct 2014 Posts: 71 Location: Germany
|
..yes, i just start playing with qmanager attributes ..
many thanks ! |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Oct 22, 2019 1:03 pm Post subject: Re: PCF get qmanager details |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
vasilev wrote: |
i am trying to get some details of the qmanager:
CCSID
VERSION
QMID
SSLKEYR |
vasilev wrote: |
Code: |
PCFMessage msg = new PCFMessage (CMQCFC.MQCMD_INQUIRE_CLUSTER_Q_MGR); |
|
Well, I'm confused. You want queue manager information but you inquire on cluster queue manager!?! Very weird!
Every PCF command that can be sent to the queue manager's command server is documented here.
Code: |
PCFMessage request = new PCFMessage(CMQCFC.MQCMD_INQUIRE_Q_MGR);
request.addParameter (CMQCFC.MQIACF_Q_MGR_ATTRS,
new int [] { CMQC.MQCA_Q_MGR_NAME,
CMQC.MQIA_CODED_CHAR_SET_ID,
CMQC.MQCA_VERSION,
CMQC.MQCA_Q_MGR_IDENTIFIER,
CMQC.MQCA_SSL_KEY_REPOSITORY});
PCFMessage[] responses = agent.send(request); |
Hence, you should get back 1 response message which you can extract the information from:
Code: |
if ((responses[0]).getCompCode() == CMQC.MQCC_OK)
{
System.out.println("QMgr Name: "+responses[0].getStringParameterValue(CMQC.MQCA_Q_MGR_NAME));
System.out.println("CCSID: "+responses[0].getIntParameterValue(CMQC.MQIA_CODED_CHAR_SET_ID));
System.out.println("Version: "+responses[0].getStringParameterValue(CMQC.MQCA_VERSION));
System.out.println("QM Id: "+responses[0].getStringParameterValue(CMQC.MQCA_Q_MGR_IDENTIFIER));
System.out.println("SSL Key Rep: "+responses[0].getStringParameterValue(CMQC.MQCA_SSL_KEY_REPOSITORY));
} |
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
vasilev |
Posted: Fri Oct 25, 2019 1:45 am Post subject: |
|
|
 Acolyte
Joined: 31 Oct 2014 Posts: 71 Location: Germany
|
Hello Roger,
yes, i took this code from some forum but changed because it is for different use
thank you for the info ! _________________ Regards
V.Vasilev |
|
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
|
|
|
|