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 » General Discussion » PCF command for channel properties

Post new topic  Reply to topic
 PCF command for channel properties « View previous topic :: View next topic » 
Author Message
souciance
PostPosted: Fri Jul 06, 2012 4:07 am    Post subject: PCF command for channel properties Reply with quote

Disciple

Joined: 29 Jun 2010
Posts: 169

Hi,

Does anyone know if there is a PCF command to return all the properties for a given MQ channel? That is, using a simple loop you can return it's properties and their values..

Thanks.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jul 06, 2012 5:05 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You mean other than INQUIRE CHANNEL?
Back to top
View user's profile Send private message
souciance
PostPosted: Fri Jul 06, 2012 5:41 am    Post subject: Reply with quote

Disciple

Joined: 29 Jun 2010
Posts: 169

The problem I am having is that for queue attributes for the reponse back you can use MQMessage [] response and from there loop through the queue attributes.

For channels it seems you have to use PCFMessage and it does not have the same methods available. Or am I misstaken here?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jul 06, 2012 6:02 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

No MQ application performing any business logic has any need to know anything about Channels

Start over.

what are you trying to do?

Why are you trying to do it?
Back to top
View user's profile Send private message
souciance
PostPosted: Fri Jul 06, 2012 6:36 am    Post subject: Reply with quote

Disciple

Joined: 29 Jun 2010
Posts: 169

At the moment I am simply playing around with some java code to understand the pcf structure better..

This is how my java code for channel attribute is looking:

Code:
     
 String[] channelTypes = {"", "SDR", "SVR", "RCVR", "RQSTR", "", "CLTCN", "SVRCN", "CLUSRCVR","CLUSSDR", ""};
String channelType="";
PCFMessage pcfPar = new PCFMessage(MQConstants.MQCMD_INQUIRE_CHANNEL);

pcfPar.addParameter(MQConstants.MQCACH_CHANNEL_NAME, channelName);
pcfParaddParameter(new MQCFIL (MQConstants.MQIACF_CHANNEL_ATTRS, new int[] {MQConstants.MQIACF_ALL}));

PCFMessage [] response;
response = agent.send(pcfPar);



channelName is the name of the channel which I get from a prevous method. The problem is, the when you use response[i], the method's available do not give that channel's properties.

Right now it seems I have to individually get them as such:

Code:

System.out.println(response[index].getParameter(MQConstants.MQCACH_CHANNEL_START_DATE).getParameterName());               
                System.out.println(response[index].getParameter(MQConstants.MQCACH_CHANNEL_START_DATE).getValue());   


Off course this is not good since some channels may not have some properties and that requires further checks etc..

I have it for queues but not able to make it for for channels..
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jul 06, 2012 7:57 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You can getParameters().

You're not going to get different coding options for the results of INQUIRE CHANNEL than you are for the results of INQUIRE QUEUE.

You might indeed get different coding options for inquiring after *all* channels, versus inquring after a *single* queue.

There are java sample programs for PCF that come with MQ.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Jul 09, 2012 2:39 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

mqjeff wrote:

what are you trying to do?

Why are you trying to do it?


souciance wrote:
At the moment I am simply playing around with some java code to understand the pcf structure better.

As you have discovered, PCF is an advanced topic. It's complicated.

ftp://ftp.software.ibm.com/software/integration/wmq/docs/V7.0/csqzac07.pdf or the equivalent InfoCenter documentation.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » PCF command for channel properties
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.