| Author | 
		  Message
		 | 
		
		  | smeunier | 
		  
		    
			  
				 Posted: Mon Dec 29, 2003 9:54 pm    Post subject: Multi-messaging using PROPAGATE problem | 
				     | 
			   
			 
		   | 
		
		
		    Partisan
 
 Joined: 19 Aug 2002 Posts: 305 Location: Green Mountains of Vermont 
  | 
		  
		    
			  
				I have been trying to create 2 messages form the original message. Each message is to be sent to a different queue. My message flow uses a single compute node, where the first message is propagated to a through a RoutToLabel->Label->MQOutput node sequence. This works just fine. My second message fails during the because of what I think is an invalid MQMD. Below is the last segments of the exception I receive. Any help would be appreciated, as I have been stuck on this for a while.
 
   
	| Code: | 
   
  
	
 
 
                                               (0x3000000)Text                 = 'Exception whilst writing field named'
 
                                               (0x3000000)Catalog              = 'WMQIv210'
 
                                               (0x3000000)Severity             = 2
 
                                               (0x3000000)Number               = 5912
 
                                               (0x1000000)Insert               = (
 
                                                 (0x3000000)Type = 5
 
                                                 (0x3000000)Text = 'MQMD'
 
                                               )
 
                                               (0x1000000)Insert               = (
 
                                                 (0x3000000)Type = 5
 
                                                 (0x3000000)Text = 'Format'
 
                                               )
 
                                               (0x1000000)Insert               = (
 
                                                 (0x3000000)Type = 5
 
                                                 (0x3000000)Text = 'MQPROPERTYPARSER'
 
                                               )
 
                                               (0x1000000)RecoverableException = (
 
                                                 (0x3000000)File     = 'F:\build\S210_P\src\CommonServices\ImbConverter.cpp'
 
                                                 (0x3000000)Line     = 245
 
                                                 (0x3000000)Function = 'ImbConverterCPP::internalFromUnicode'
 
                                                 (0x3000000)Type     = ''
 
                                                 (0x3000000)Name     = ''
 
                                                 (0x3000000)Label    = ''
 
                                                 (0x3000000)Text     = 'String too long to convert'
 
 | 
   
 
 
 
Below is the esql used to create the second message:
 
   
	| Code: | 
   
  
	
 
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname = 'Label2';
 
 
SET OutputRoot.MQMD = InputRoot.MQMD;
 
SET OutputRoot.MQMD.Format = 'MQSTR   ';
 
SET OutputRoot.MQMD.MsgType = 8;
 
SET OutputRoot.MQMD.Persistence = 1;
 
 
 
SET OutputRoot.Properties.MessageFormat='XML';
 
 
--Create an XML Declaration
 
SET OutputRoot.XML.(XML.XmlDecl)='';
 
 
--Set the Version within the XML Declaration
 
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version)='1.0';
 
 
--Set the Encoding within the XML Declaration
 
SET OutputRoot.XML.(XML.XmlDecl).(XML."Encoding")='UTF-8';
 
 
-- Set the Standalone attribute
 
SET OutputRoot.XML.(XML.XmlDecl).(XML.Standalone)='no';
 
 
SET OutputRoot.XML.(XML.Element)ERROR.(XML.Element)Report.(XML.Attribute)Test= 'Test of 2nd message';
 
 
PROPAGATE;
 
 | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | zpat | 
		  
		    
			  
				 Posted: Tue Dec 30, 2003 12:09 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 19 May 2001 Posts: 5867 Location: UK 
  | 
		  
		    
			  
				When you use propagate, set the compute node return code in the ESQL at the end of the compute node with RETURN FALSE;
 
 
If you don't then MQSI will try to propagate an incomplete message in addition to the ones you wanted to propagate.
 
 
This might be the problem. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | smeunier | 
		  
		    
			  
				 Posted: Tue Dec 30, 2003 6:00 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Partisan
 
 Joined: 19 Aug 2002 Posts: 305 Location: Green Mountains of Vermont 
  | 
		  
		    
			  
				| RETURN FALSE was used in the ESQL. I did not include it within the example. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Tue Dec 30, 2003 6:13 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				It looks like your 
   
	| Code: | 
   
  
	| SET OutputRoot.MQMD.Format = 'MQSTR   '; | 
   
 
 may not be correct.  The parser seems to be complaining about the field length.  Maybe you could try using MQFMT_STRING instead of the constant.
 
 
Plus, you may be better off copying the code "above the line" into your ESQL where you are re-creating the MQMD.  There's stuff about assigning the right parsers to the right subtrees that may not be happening the way you're doing it.  (Although it shouldn't be throwing the error it is if that's the case). _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kirani | 
		  
		    
			  
				 Posted: Tue Dec 30, 2003 11:38 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Jedi Knight
 
 Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA 
  | 
		  
		    
			  
				It seems your properties folder is not copied when building your output tree for the second message. Try adding following statements in the beginning of the code where you create second message.
 
 
   
	| Code: | 
   
  
	
 
SET OutputRoot.Properties = InputRoot.Properties;
 
SET OutputRoot.MQMD = InputRoot.MQMD;
 
....
 
....
 
 | 
   
 
 _________________ 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | smeunier | 
		  
		    
			  
				 Posted: Tue Dec 30, 2003 11:10 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Partisan
 
 Joined: 19 Aug 2002 Posts: 305 Location: Green Mountains of Vermont 
  | 
		  
		    
			  
				I applied the  recommendation, by copying the Properties as well as the MQMD from the InputRoot. It seems that WMQI requires Properties as the first encountered parser, followed by MQMD. I also used the MQFMT_STRING as well. I suspect, the properties addition resolved the problem.
 
 
Thanks guys. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jfluitsm | 
		  
		    
			  
				 Posted: Sun Jan 04, 2004 4:35 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Disciple
 
 Joined: 24 Feb 2002 Posts: 160 Location: The Netherlands 
  | 
		  
		    
			  
				After a propagate the OutputRoot is empty, so you have to redo the copy of the headers or copy of the entire message, whatever is appropiate for your situation. _________________ Jan Fluitsma
 
 
IBM Certified Solution Designer WebSphere MQ V6
 
IBM Certified Solution Developer WebSphere Message Broker V6 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |