|   | 
	 
  
    | 
RSS Feed - WebSphere MQ Support
 | 
RSS Feed - Message Broker Support
 |   
 
  
	     | 
	 | 
   
 
  
	|  PCF Programming:  Inquire Channel Status | 
	« View previous topic :: View next topic »  | 
   
  
  	
	  
		
		
		  | Author | 
		  Message
		 |  
		
		  | mikehkk | 
		  
		    
			  
				 Posted: Tue Jun 29, 2004 7:27 am    Post subject: PCF Programming:  Inquire Channel Status | 
				     | 
			   
			 
		   | 
		 
		
		   Apprentice
 
 Joined: 29 Jul 2002 Posts: 25
  
  | 
		  
		    
			  
				I'm looking at the sample VB programs.  One program has a demo of how to inquire channel NAMES via PCF's using these structues:
 
 
Private Type PCFInquireChannelNames
 
    Header As MQCFH
 
    ' Required parameters
 
    ChannelName As MQCFST
 
    ChannelName_String As String * MQ_CHANNEL_NAME_LENGTH
 
    ' Optional parameters
 
    ChannelType As MQCFIN
 
End Type
 
 
Private Type ResponsePCFInquireChannelNames
 
    Header As MQCFH
 
    ChannelName As MQCFSL
 
    ChannelName_String(MAX_NUM_CHANNELS) As String * MQ_CHANNEL_NAME_LENGTH
 
End Type
 
 
Does anyone have experience with type of the sort "PCFInquireChannelStatus" and "ResponsePCFInquireChannelStatus"?
 
 
Unfortunately, IBM's documentation is very scant in this area.  
 
 
Thanks. | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | JasonE | 
		  
		    
			  
				 Posted: Wed Jun 30, 2004 1:16 am    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Grand Master
 
 Joined: 03 Nov 2003 Posts: 1220 Location: Hursley 
  | 
		  
		    
			  
				Not directly, but PCF programming shouldnt be difficult if you have a sample to change. Look in the PCF manual for Inquire Channel Status. 
 
 
Just remember the real key to PCF programming is:
 
 
1. Read the manual carefully
 
2. Look at the response - If the MQCFH Control field does not have MQCFC_LAST then there is another reply coming
 
2b. You may get one reply with a specific error and another saying a PCF error occurred
 
3. For channel status, there is no status for channels which are inactive.
 
4. read the manual again...   
 
 
 
The docs state the required parms are a channel name, + some optional parms. 
 
 
The PCF data is always (see chapter 5):
 
MQCFH
 
0,1,2,... x one of
 
   MQCFIN (Integer parms)
 
   MQCFST (String parms)
 
   MQCFIL (Integer Lists)
 
   MQCFSL (String Lists)
 
 
Therefore the MQCFH inbound is (assuming you dont want any optional parms):
 
 
Untried, Untested, Hopeful...
 
 
Private Type PCFInquireChannelStatus
 
Header As MQCFH 
 
' Required parameters 
 
ChannelName As MQCFST 
 
ChannelName_String As String * MQ_CHANNEL_NAME_LENGTH 
 
End Type 
 
 
Outbound the docs state the 'always returned' values as Channel Name, XmitQName, ConnectionName, ChannelInstanceType, ChannelType, ChannelStatus, RemoteQName (in that order)
 
 
This would match something like (again, just guessing):
 
 
Private Type ResponsePCFInquireChannelStatus
 
Header As MQCFH 
 
ChannelName As MQCFST
 
ChannelName_String As String * MQ_CHANNEL_NAME_LENGTH 
 
xmitQ As MQCFST
 
xmitQ_String As String * MQ_Q_NAME_LENGTH 
 
connName As MQCFST
 
connName_String As String * MQ_CONN_NAME_LENGTH 
 
instType As MQCFIN  '( see .value for value)
 
chlType As MQCFIN  '( see .value for value)
 
chlStatus As MQCFIN  '( see .value for value)
 
remoteQmgr As MQCFST
 
remoteQmgr_String As String * MQ_Q_MGR_NAME_LENGTH  
 
End Type | 
			   
			 
		   | 
		 
		
		  | 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
  | 
  		 
	   
	 | 
   
 
  	 | 
	  |