|   | 
	 
  
    | 
RSS Feed - WebSphere MQ Support
 | 
RSS Feed - Message Broker Support
 |   
 
  
	     | 
	 | 
   
 
  
	|  [Solved] help with COA (confirm of arrival) and perl | 
	« View previous topic :: View next topic »  | 
   
  
  	
	  
		
		
		  | Author | 
		  Message
		 |  
		
		  | golemwashere | 
		  
		    
			  
				 Posted: Mon Jun 14, 2004 2:50 am    Post subject: [Solved] help with COA (confirm of arrival) and perl | 
				     | 
			   
			 
		   | 
		 
		
		   Newbie
 
 Joined: 29 Dec 2003 Posts: 8
  
  | 
		  
		    
			  
				Hello  gurus,
 
I need help with this :
 
When my client is putting a message in a queue,I need
 
a COA message on another queue on the same queue manager...
 
 
This is the code snippet I'm trying to use:
 
 
_________________________________________________
 
   
	| Code: | 
   
  
	
 
  my $queue = MQSeries::Queue->new
 
    (
 
     QueueManager       => $qmgr_name,
 
     Queue              => $nomequeue,
 
     Mode               => 'output',
 
    )
 
    or die("Unable to open queue.\n");
 
 
 
my $putmessage = MQSeries::Message->new
 
(
 
     MsgDesc            =>
 
     {
 
      CorrelId => $correlid,
 
      MsgId => $msgid,
 
      Format            => MQFMT_STRING,
 
      ReplyToQ   => $replyqueue,
 
      ReplyToQMgr => $qmgr_name,
 
      Params            =>
 
     {
 
     Report => COA_WITH_DATA,
 
     }   
 
 
     },
 
    Data => $msg,
 
 
        
 
    );
 
 
  $queue->Put(
 
              Message => $putmessage,
 
              Sync => $sync
 
             )
 
    or die("Unable to put message onto queue.\n" .
 
           "CompCode = " . $queue->CompCode() . "\n" .
 
           "Reason = " . $queue->Reason() . "\n");
 
 
 | 
   
 
 
________________________________
 
 
The PUT works great but I have no Confirmation message in queue $replyqueue
 
and no message in DEAD.LETTER.QUEUE
 
any suggestion would be welcome
 
(I'm not really sure of MQMD syntax concering the report part)
 
 
Infinite thanks
 
 
 
Golem | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | TJW | 
		  
		    
			  
				 Posted: Thu Jul 08, 2004 7:06 am    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Novice
 
 Joined: 11 Dec 2002 Posts: 16 Location: UK 
  | 
		  
		    
			  
				Your $putmessage should look like this:
 
   
	| Code: | 
   
  
	
 
my $putmessage = MQSeries::Message->new 
 
( 
 
     MsgDesc            => 
 
     { 
 
      CorrelId => $correlid, 
 
      MsgId => $msgid, 
 
      Format            => MQFMT_STRING, 
 
      ReplyToQ   => $replyqueue, 
 
      ReplyToQMgr => $qmgr_name, 
 
      Report => MQRO_COA_WITH_DATA
 
     }, 
 
    Data => $msg,
 
 
); 
 
 | 
   
 
 
 
If this still doesn't work try using the real value of MQRO_COA_WITH_DATA, which is 768 (decimal). | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | kirani | 
		  
		    
			  
				 Posted: Thu Jul 08, 2004 1:49 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Jedi Knight
 
 Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA 
  | 
		  
		    
			  
				To get COA message with Data you would specify MQRO_COA_WITH_DATA option. To get only COA message you need to specify MQRO_COA option. _________________ Kiran
 
 
 
IBM Cert. Solution Designer & System Administrator - WBIMB V5
 
IBM Cert. Solutions Expert - WMQI
 
IBM Cert. Specialist - WMQI, MQSeries
 
IBM Cert. Developer - MQSeries
 
 
 | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | golemwashere | 
		  
		    
			  
				 Posted: Fri Jul 09, 2004 2:08 am    Post subject: It works!!! | 
				     | 
			   
			 
		   | 
		 
		
		   Newbie
 
 Joined: 29 Dec 2003 Posts: 8
  
  | 
		  
		    
			  
				Hey it works !!!!
 
only with the 768 value though
 
do you know what's the decimal number for COA without data or where to find all the values?
 
Thanks a lot guys
 
you're great as always
 
 
Golem | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | PeterPotkay | 
		  
		    
			  
				 Posted: Fri Jul 09, 2004 7:44 am    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		    Poobah
 
 Joined: 15 May 2001 Posts: 7723
  
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	
 
To get only COA message you need to specify MQRO_COA option.
 
 | 
   
 
 _________________ Peter Potkay
 
Keep Calm and MQ On | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | kirani | 
		  
		    
			  
				 Posted: Fri Jul 09, 2004 10:27 am    Post subject: Re: It works!!! | 
				     | 
			   
			 
		   | 
		 
		
		   Jedi Knight
 
 Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA 
  | 
		  
		    
			  
				
   
	| golemwashere wrote: | 
   
  
	do you know what's the decimal number for COA without data or where to find all the values?
 
 | 
   
 
 
 
Decimal value for COA without data (MQRO_COA) is 256. You can find the constant names and their values into Application Programming Reference manual. It's recommended that you use constants instead of decimal values. _________________ Kiran
 
 
 
IBM Cert. Solution Designer & System Administrator - WBIMB V5
 
IBM Cert. Solutions Expert - WMQI
 
IBM Cert. Specialist - WMQI, MQSeries
 
IBM Cert. Developer - MQSeries
 
 
 | 
			   
			 
		   | 
		 
		
		  | 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
  | 
  		 
	   
	 | 
   
 
  	 | 
	  |