Author |
Message
|
V&G |
Posted: Thu Oct 20, 2005 7:34 am Post subject: Versions of MQSeries API |
|
|
Novice
Joined: 20 Oct 2005 Posts: 14
|
I'm browsing IBM's online MQ 6.0 infocenter and seeing some interesting commands like MQCMD_INQUIRE_CLUSTER_Q_MGR and MQCMD_INQUIRE_Q_MGR_STATUS. But when I tried to use them I got exception about invalide command code.
Is there an innovations of version 6.0?
If it's not a case is there anywhere downloadable version of libraries supporting this commands (.NET libraries preferable) |
|
Back to top |
|
 |
wschutz |
Posted: Thu Oct 20, 2005 7:38 am Post subject: Re: Versions of MQSeries API |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
V&G wrote: |
I'm browsing IBM's online MQ 6.0 infocenter and seeing some interesting commands like MQCMD_INQUIRE_CLUSTER_Q_MGR and MQCMD_INQUIRE_Q_MGR_STATUS. But when I tried to use them I got exception about invalide command code.
Is there an innovations of version 6.0?
If it's not a case is there anywhere downloadable version of libraries supporting this commands (.NET libraries preferable) |
Np, they are not new to V6. They are constants to be used in creating PCF commands to send to the MQ command server, they are not API's that you can call directly.
Have a look at the MQAI in the infocenter _________________ -wayne |
|
Back to top |
|
 |
jasonJonas |
Posted: Thu Oct 20, 2005 7:52 am Post subject: Re: Versions of MQSeries API |
|
|
Novice
Joined: 07 Sep 2005 Posts: 10
|
V&G wrote: |
If it's not a case is there anywhere downloadable version of libraries supporting this commands (.NET libraries preferable) |
there is a .net api, but it's just a wrapper over the mq client libraries so they're still required. after installing mq (client or full), you'll find the
amqmdnet.dll
file in <install-dir>/bin. add this dll to your project and code away. there's a good redbook called "WebSphere MQ Using .NET Version 6.0" that i encourage you to peruse. while you're there, download the applicaiton programming guide, programming reference and messages redbooks. there are others you may find useful.
jason |
|
Back to top |
|
 |
V&G |
Posted: Thu Oct 20, 2005 7:58 am Post subject: |
|
|
Novice
Joined: 20 Oct 2005 Posts: 14
|
wschutz
Ok, there is no definitions for constants. I have tryed to use numbers instead. But I have exception on execution step (from Send() function). So,as I understand, it is an exception from the core library...
contact admin
Yep, that is a dll I'm using but it has not definition for these commands (wrong version??.. I'm using 1.0.0.3)
I'm using this manual too. But there is nothing about the subj. there... |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 20, 2005 8:04 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Can we see your code, please? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jasonJonas |
Posted: Thu Oct 20, 2005 10:48 am Post subject: |
|
|
Novice
Joined: 07 Sep 2005 Posts: 10
|
V&G wrote: |
Yep, that is a dll I'm using but it has not definition for these commands (wrong version??.. I'm using 1.0.0.3)
|
hmmm... i'm using the same version of the .net dll. perhaps this is an area of new functionality in v6 that is not yet supported in the .net dll wrapper? if that's the case, then you could always write C/C++, assuming these are new v6 commands and supported in the present v6 MQ libs.
jason |
|
Back to top |
|
 |
wschutz |
Posted: Thu Oct 20, 2005 10:58 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Perhaps its me, but I'm confused here... what new ".net" commands
are we speaking of? There are no new .net classes or methods in V6 for doing PCF commands.
As Jeff suggest, lets have V&G post their code .... _________________ -wayne |
|
Back to top |
|
 |
V&G |
Posted: Sat Oct 22, 2005 10:28 pm Post subject: |
|
|
Novice
Joined: 20 Oct 2005 Posts: 14
|
wschutz
jefflowrey
I'm confused little bit, because now we are spoken about the same things in two different threads: here and in "How to retrieve channel status"...
Ok, lets suspend the other one and, for beginning, make a decisions here ...
For example, I'm trying the code wschutz proposed:
pcfMsg.AddParameter(new MQCFIL(CMQCFC.MQIACH_CHANNEL_INSTANCE_TYPE,
new int[] { CMQCFC.MQOT_SAVED_CHANNEL } ));
Compiler say: "IBM.WMQ.PCF.CMQCFC' does not contain a definition for 'MQOT_SAVED_CHANNEL'". Really, I didn't see it in Object Brower too.
Ok, I think may be a wrapper does not contains all definitions and I replaced the constant with 1012. On execution I got exception with error code MQRCCF_CFIN_PARM_ID_ERROR. |
|
Back to top |
|
 |
wschutz |
Posted: Sun Oct 23, 2005 6:17 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Try:
Code: |
pcfMsg.AddParameter(new MQCFIL(CMQCFC.MQIACH_CHANNEL_INSTANCE_TYPE,
new int[] { CMQC.MQOT_SAVED_CHANNEL } ));
|
(just a guess based on the fact that MQOT_SAVED_CHANNEL is #defined in cqcc.h) _________________ -wayne |
|
Back to top |
|
 |
hopsala |
Posted: Sun Oct 23, 2005 7:32 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
jefflowrey wrote: |
Can we see your code, please? |
Yes, can we? |
|
Back to top |
|
 |
V&G |
Posted: Thu Oct 27, 2005 1:55 am Post subject: |
|
|
Novice
Joined: 20 Oct 2005 Posts: 14
|
Here is my code:
Code: |
PCFMessage pcfMsg = new PCFMessage(CMQCFC.MQCMD_INQUIRE_CHANNEL_STATUS);
pcfMsg.AddParameter(new MQCFST(CMQCFC.MQCACH_CHANNEL_NAME, channelName));
pcfMsg.AddParameter(new MQCFIL(CMQCFC.MQIACH_CHANNEL_INSTANCE_TYPE,
new int[] { MQC.MQOT_SAVED_CHANNEL } )); // as wschutz suggested
try
{
pcfResponses = agent.Send(pcfMsg);
Console.WriteLine("; status: " + pcfResponses[0].GetIntParameterValue(CMQCFC.MQIACH_CHANNEL_STATUS));
}
catch(Exception e)
{
......
} |
wschutz
I found MQOT_SAVED_CHANNEL constant in MQC struct. The result was an exception with error code MQRCCF_CFIL_PARM_ID_ERROR |
|
Back to top |
|
 |
wschutz |
Posted: Thu Oct 27, 2005 2:10 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Are you using the MS0B supportpac and java?
In any case, this works for me:
Code: |
PCFParameter [] parameters =
{
new MQCFST (CMQCFC.MQCACH_CHANNEL_NAME, "*"),
new MQCFIN (CMQCFC.MQIACH_CHANNEL_INSTANCE_TYPE, MQC.MQOT_SAVED_CHANNEL)
};
...
responses = agent.send (CMQCFC.MQCMD_INQUIRE_CHANNEL_STATUS, parameters);
|
Using the older version of the classes from the s/p... _________________ -wayne |
|
Back to top |
|
 |
V&G |
Posted: Thu Oct 27, 2005 4:44 am Post subject: |
|
|
Novice
Joined: 20 Oct 2005 Posts: 14
|
This way it work for me too but I think we lost it
I did not need to get the type of the channel. I need to get channel's status.
I'm using C# and amqmdnet.dll
The difference was I used MQCFIL insteed MQCFIN but why does it difference?
In manual I see that I should use:
Command: MQCMD_INQUIRE_CHANNEL_STATUS
Requared param: MQCACH_CHANNEL_NAME
Optional param: (I don't know, but I guess) MQIACH_CHANNEL_INSTANCE_ATTRS
with somethig defining that I want to get channel status only, but what is it?
And (as I see it may do difference) what type of parameters I should use: MQCFIN or MQCFIL?
Last edited by V&G on Thu Oct 27, 2005 4:51 am; edited 1 time in total |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 27, 2005 4:50 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You should be able to "translate" Wayne's last example into C#.
Wayne's running Linux, so he can't help with C#. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
V&G |
Posted: Thu Oct 27, 2005 4:56 am Post subject: |
|
|
Novice
Joined: 20 Oct 2005 Posts: 14
|
Translation - it's not a problem despite of in amqmdnet library some methods you are using are protected and not accessable.
(See my previous post)
From here it's clear that there is no versioning in MQ libraries. I suggest to return to "How to retrieve channel status" thread... |
|
Back to top |
|
 |
|