|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Versions of MQSeries API |
« View previous topic :: View next topic » |
Author |
Message
|
wschutz |
Posted: Thu Oct 27, 2005 7:38 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
This way it work for me too but I think we lost it |
What do you mean?
Quote: |
I did not need to get the type of the channel. I need to get channel's status |
Yes, I understand that, thats why you see:
Code: |
responses = agent.send (CMQCFC.MQCMD_INQUIRE_CHANNEL_STATUS, parameters); |
Quote: |
The difference was I used MQCFIL insteed MQCFIN but why does it difference?
|
MQCFIL is a list of integers, MQCFIN is a single integer. You must use MQCFIN
Quote: |
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?
|
the try setting MQIACH_CHANNEL_INSTANCE_ATTRS to MQIACH_CHANNEL_STATUS. I think there will always be certain attributes that are always returned (channel name and type, for example). _________________ -wayne |
|
Back to top |
|
 |
fphilips |
Posted: Sun Apr 26, 2015 4:29 pm Post subject: I got it to in C# |
|
|
Newbie
Joined: 26 Apr 2015 Posts: 1
|
PCFMessageAgent agent;
PCFMessage request;
PCFMessage [] responses;
agent = new PCFMessageAgent(this.host,this.port, this.channel);
request = new PCFMessage(MQC.MQCMD_INQUIRE_CHANNEL_STATUS);
request.addParameter(MQC.MQCACH_CHANNEL_NAME, "*");
responses = agent.send (request);
foreach (PCFMessage pcfResponse in pcfResponses)
{
try
{
string mca_name = pcfResponse.GetStringParameterValue(MQC.MQCACH_MCA_USER_ID).Trim();
string channelName = pcfResponse.GetStringParameterValue(MQC.MQCACH_CHANNEL_NAME).Trim();
int channelStatus = pcfResponse.GetIntParameterValue(MQC.MQIACH_CHANNEL_STATUS);
if (!String.IsNullOrEmpty(mca_name))
{
string trimmed_mca_name = mca_name;
if (ConsoleOn)
{
Console.WriteLine("MCA User ID is : " + trimmed_mca_name + " for channel " + channelName + "\n");
}
}
else
{
if (ConsoleOn)
{
Console.WriteLine("mca_names is null for channel " + channelName + "/n");
}
}
ChannelData.Add(String.Format("{0},{1}", channelName, chStatusText[channelStatus]));
}
catch(MQException mqe)
{
string exception = mqe.Message;
int code = mqe.ReasonCode;
}
}
return ChannelData;
} |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|