| Author | Message | 
		
		  | adoyle65 | 
			  
				|  Posted: Thu Jun 24, 2004 10:29 am    Post subject: Navigating MRM message |   |  | 
		
		  | Apprentice
 
 
 Joined: 18 Feb 2004Posts: 37
 Location: Canada
 
 | 
			  
				| If I have a message flow that receives 3 similar but slightly different MRM messages of the following format 
 prod
 id
 detail
 
  field1
field2
 field3
 field4
 
 The detail data will vary for each of the messages but I want to use one database node to insert/update to 3 different table based on the message.  How do I declare a reference variable to the detail component of my message?
 
 Am I right in thinking that
 
 
 
   
	| Code: |  
	| DECLARE Detail REFERENCE TO Body.*[1]; 
 |  
 Would set my reference variable to prod?
 Could I then just use nextsibling to navigate to the detail part of my message?
 
 Thanks in advance.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kirani | 
			  
				|  Posted: Thu Jun 24, 2004 11:02 am    Post subject: |   |  | 
		
		  | Jedi Knight
 
 
 Joined: 05 Sep 2001Posts: 3779
 Location: Torrance, CA, USA
 
 | 
			  
				| 
   
	| adoyle65 wrote: |  
	| The detail data will vary for each of the messages but I want to use one database node to insert/update to 3 different table based on the message. How do I declare a reference variable to the detail component of my message?
 
 |  Well it depends on how you modeled your message. Can you let us know which wire format are you using and how the elements are layed out?
 
 
 
   
	| adoyle65 wrote: |  
	| Am I right in thinking that
 
 Code:
 DECLARE Detail REFERENCE TO Body.*[1];
 
 
 Would set my reference variable to prod?
 
 |  Yes.
 
 
 
   
	| adoyle65 wrote: |  
	| Could I then just use nextsibling to navigate to the detail part of my message?
 
 |  Yes. Or you can declare a reference to point to detail directly. I am assuming that your elements field1, field2 ... reside in a group.
 
 
 
   
	| Code: |  
	| DECLARE Detail REFERENCE TO Body.*[3];
 
 |  _________________
 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 |  | 
		
		  |  | 
		
		  | adoyle65 | 
			  
				|  Posted: Thu Jun 24, 2004 11:22 am    Post subject: |   |  | 
		
		  | Apprentice
 
 
 Joined: 18 Feb 2004Posts: 37
 Location: Canada
 
 | 
			  
				| Hi Kirani, 
 We have used CWF.
 
 The message format is somewhat like below.
 
 product int
 function int
 list int
 card int
 status int
 row_size int
 row_count int
 events
 
 
card int
 event int
 odds int
 points int
 team int
 rank int
 
 
 This is pretty close to the format.
 
 So product is "Body".*[1] ?
 Is events then "Body".*[8]?
 
 What is odds in events ?
 
 Hope this helps clear it up some.  Thanks again Kirani for the quick response, you are a great help for newcomers like myself.
 
 Regards
 Aidan
 
 [/list]
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kirani | 
			  
				|  Posted: Thu Jun 24, 2004 1:07 pm    Post subject: |   |  | 
		
		  | Jedi Knight
 
 
 Joined: 05 Sep 2001Posts: 3779
 Location: Torrance, CA, USA
 
 | 
			  
				| 
   
	| adoyle65 wrote: |  
	| So product is "Body".*[1] ?
 
 |  Yes.
 
 
 
   
	| adoyle65 wrote: |  
	| Is events then "Body".*[8]?
 
 |  Yes. You can also use "Body".*[LAST]
 
 
 
   
	| adoyle65 wrote: |  
	| What is odds in events ?
 
 |  Try using "Body".*[LAST].*[3];
 
 This code is untested, so I am not sure about any syntax errors.
 _________________
 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 |  | 
		
		  |  | 
		
		  | adoyle65 | 
			  
				|  Posted: Fri Jun 25, 2004 6:51 am    Post subject: |   |  | 
		
		  | Apprentice
 
 
 Joined: 18 Feb 2004Posts: 37
 Location: Canada
 
 | 
			  
				| Hi, 
 Thanks again for the help.  One more question I hope you can help clear up for me.  As I said I have three similiar but different messages that all go to the same Database Node.  In this node I have added the 3 messages.  The input to the Database Node comes by way of a RouteToLabel node and a ResetContent node.  In my Database node do I have to specify which type of message is coming in or is it smart enough to know?
 
 Thanks
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kirani | 
			  
				|  Posted: Fri Jun 25, 2004 10:03 am    Post subject: |   |  | 
		
		  | Jedi Knight
 
 
 Joined: 05 Sep 2001Posts: 3779
 Location: Torrance, CA, USA
 
 | 
			  
				| If you have used the RCD node before then it knows which message is coming in! _________________
 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 |  | 
		
		  |  | 
		
		  |  |