| Author | 
		  Message
		 | 
		
		  | wildtiger | 
		  
		    
			  
				 Posted: Tue Nov 12, 2002 12:03 pm    Post subject: Problem with PROPAGATE statement | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 21 Apr 2002 Posts: 55 Location: Canada 
  | 
		  
		    
			  
				I just put the following ESQL statement in a compute node, which should generate 3 messages for each incoming message.
 
 
======
 
DECLARE i INTEGER;
 
Set i =1;
 
WHILE i <= 3 DO
 
  SET OutputRoot =InputRoot;
 
  SET OutputRoot.XML =NULL;
 
  SET OutputRoot.XML.BookSold."Item"=i;
 
  PROPAGATE;
 
  SET i =i+1;
 
END WHILE;
 
RETURN FALSE;
 
======
 
 
It generated three messages. But they have the same message id and the content of the message are exactly same:
 
 
<BookSold><Item>1</Item></BookSold>
 
 
Have anybody else met the same problem? Can anyone tell me what's wrong with PROPAGATE statement?
 
 
Thanks in advance!
 
 
d | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | amigupta1978 | 
		  
		    
			  
				 Posted: Wed Nov 13, 2002 12:22 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 22 Jan 2002 Posts: 132 Location: India 
  | 
		  
		    
			  
				Hi,
 
I have tried propogate many times. It works fine.
 
Message Id for all the three messages will be same until u specify in MQOUTput node to generate message ID.
 
Just a lil thought abt the same body, how exactly r u viewing the message. Say if u r using some other utility (other than MQExplorer) which actually match the messageID of message then mite be for all the messages u view, its picking up the first message only.
 
 
Rgds
 
Amit _________________ IBM certified MQseries Specialist
 
IBM certified WMQI Specialist | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Yanghui | 
		  
		    
			  
				 Posted: Wed Nov 13, 2002 2:17 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Disciple
 
 Joined: 08 May 2002 Posts: 151 Location: Dublin, Ireland 
  | 
		  
		    
			  
				Hi, Wildtiger,
 
 
Hope you don't mind my curiosity.
 
 
I don't understand why you use 
 
 
RETURN FALSE; 
 
 
in your ESQL of a Compute node. I thought it's only for Filter node. Is this another way to force the outgoing msg go via Failure terminal of a Compute Node?
 
 
Thanks in advance.
 
 
-Yanghui | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | wildtiger | 
		  
		    
			  
				 Posted: Wed Nov 13, 2002 3:11 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 21 Apr 2002 Posts: 55 Location: Canada 
  | 
		  
		    
			  
				Hi Amit,
 
 
I wrote a program to retrieve/browse messages in a queue. So I can see they have the same content (all OutputRoot.XML.BookSold."Item" has the same value "1"), same message id but individual messages.
 
 
Could u try this with the exact ESQL statements I did to see if it works?
 
 
Thanks,
 
 
d | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | amigupta1978 | 
		  
		    
			  
				 Posted: Thu Nov 14, 2002 2:52 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 22 Jan 2002 Posts: 132 Location: India 
  | 
		  
		    
			  
				Hi,
 
I am currently not having a ready 2.1 installtion so I cant test. But I am quite sure that Propagate worked fine.
 
Now U say u have made the program. Most likely there is a error there.
 
 
Ok say if u have java program and u then get messages in the loop, make sure that u set the MQMO.MATCHMessageOptions to None. Since what happens that when u get the messages in loop and u use that particular Message object to fetch the next message in loop, then MQseries mattches the MessageID unless u specify MQMO_NONE (match message option to None). 
 
Can u send me ur reading program?
 
 
 
and Hi Yanghui,
 
return False here means that the compute node will not further transfer the message to the next node.
 
 
Regards,
 
Amit _________________ IBM certified MQseries Specialist
 
IBM certified WMQI Specialist | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | wmqiguy | 
		  
		    
			  
				 Posted: Thu Nov 14, 2002 6:11 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 09 Oct 2002 Posts: 145 Location: Florida 
  | 
		  
		    
			  
				Thanks Amit!
 
 
I was not aware of that RETURN FALSE either.  We were just making sure that the last message instance was not propagated.  That little tidbit will make the code a bit less convoluted.
 
 
Again thanks!     | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | wildtiger | 
		  
		    
			  
				 Posted: Thu Nov 14, 2002 12:43 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 21 Apr 2002 Posts: 55 Location: Canada 
  | 
		  
		    
			  
				Yes Amit, you are right. Due to the same msg ids, so each time I retrieved message, I always got the 1st message. When I set the "new Msg Id" option on MQOutput node. It worked fine.
 
 
Thank you again,
 
 
David | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |