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 » IBM MQ API Support » Versions of MQSeries API

Post new topic  Reply to topic Goto page Previous  1, 2
 Versions of MQSeries API « View previous topic :: View next topic » 
Author Message
wschutz
PostPosted: Thu Oct 27, 2005 7:38 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
fphilips
PostPosted: Sun Apr 26, 2015 4:29 pm    Post subject: I got it to in C# Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » IBM MQ API Support » Versions of MQSeries API
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.