|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| Completion Code 2, Reason 2195 | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | EMJAY | 
			  
				|  Posted: Tue Aug 04, 2009 9:34 am    Post subject: Completion Code 2, Reason 2195 |   |  |  
		  | Newbie
 
 
 Joined: 04 Aug 2009Posts: 1
 
 
 | 
			  
				| Hello, 
 I'm new to MQ and I am trying to get the queue depth from MVS and running into this error -
 
 MQJE001: An MQException occurred: Completion Code 2, Reason 2195
 MQJE007: IO error reading message data
 MQJE001: An MQException occurred: Completion Code 2, Reason 2195
 MQJE018: Protocol error - unexpected segment type received
 
 Here is the code I'm using -
 
 
 
   
	| Code: |  
	| 
 static void init() throws MQException {
 MQEnvironment.hostname = "hostname";
 MQEnvironment.port = 1430;
 MQEnvironment.channel = " ";
 qMgr = new com.ibm.mq.MQQueueManager(" ");
 currentQueue = " ";
 
 }
 
 // This method will get number of messages in the requesting Queue
 // MQQueueManager argument
 
 public void getQDepth(boolean DEBUG, MQQueueManager qManager)
 throws MQException {
 openOptions = MQC.MQOO_OUTPUT |MQC.MQOO_INQUIRE | MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_FAIL_IF_QUIESCING;
 
 MQQueue q2 = qManager.accessQueue(currentQueue, openOptions, null,null, null);
 
 currentQDepth = q2.getCurrentDepth();
 
 currentTime = getTime();
 
 q2.close();
 qMgr.disconnect();
 
 
 
 |  
 Any insight is greatly appreciated.
 
 Thank You!
 |  |  
		  | Back to top |  |  
		  |  |  
		  | Vitor | 
			  
				|  Posted: Tue Aug 04, 2009 9:46 am    Post subject: Re: Completion Code 2, Reason 2195 |   |  |  
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| EMJAY wrote: |  
	| Any insight is greatly appreciated. |  
 - A 2195 is accompanied by an error file which might help
 - I assume that somewhere else in the app the currentQueue is set to something other than spaces
 - If you're trying to get the depth of a remote queue object I'd expect a failure; not a 2195 probably but I'd not be astonished if you got a 2195
 - there's no good reason for an application program to be concerned with queue depth. If you're trying to write some kind of monitoring then there are existing solutions which don't involve you reinventing the wheel
 
 More specific help I'll leave to people who can speak with authority on Java.
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  |  
		  | 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
 
 |  |  |  |