|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| Message Tree Copying | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | pottas | 
			  
				|  Posted: Fri May 03, 2019 3:30 am    Post subject: Message Tree Copying |   |  |  
		  |  Disciple
 
 
 Joined: 27 Oct 2005Posts: 185
 Location: South Africa
 
 | 
			  
				| Hi guys, I am probably just missing something obvious....
 
 I want to preserve my input by putting it into the Environment as follows:
 
 
 
   
	| Code: |  
	| SET Environment.Properties    = InputRoot.Properties; SET Environment.MQMD         = InputRoot.MQMD;
 SET Environment.MQRFH2         = InputRoot.MQRFH2;
 SET Environment.Input      = InputRoot.XMLNSC;
 
 |  
 ...but, of course the XMLNSC parser is not automatically created in the target, I actually need to replace the last line above with the following (got that from the IBM documentation link, see further down in this post):
 
 
 
   
	| Code: |  
	| CREATE FIELD Environment.Variables.XMLNSC DOMAIN 'XMLNSC'; SET Environment.Variables.XMLNSC = InputRoot.XMLNSC;
 
 |  
 ...but this produces a compile error: 'Syntax error. Valid options include....'
 
 And the above lines I copied verbatim from the IBM knowledge centre documentation link:
 https://www.ibm.com/support/knowledgecenter/en/SSMKHH_9.0.0/com.ibm.scenarios.doc/gop_03/topics/bj60033_.htm
 
 So, as stated, I am probably missing something small.
 
 Please assist, appreciated!
 |  |  
		  | Back to top |  |  
		  |  |  
		  | abhi_thri | 
			  
				|  Posted: Fri May 03, 2019 4:12 am    Post subject: Re: Message Tree Copying |   |  |  
		  |  Knight
 
 
 Joined: 17 Jul 2017Posts: 516
 Location: UK
 
 | 
			  
				| hi...try this and see, 
 
 
   
	| Code: |  
	| CREATE FIELD Environment.Variables;
 CREATE LASTCHILD OF Environment.Variables DOMAIN ('XMLNSC') TYPE XMLNSC.Folder NAME 'XMLNSC';
 SET Environment.Variables.XMLNSC = InputRoot.XMLNSC;
 |  
 https://www.ibm.com/support/knowledgecenter/SSMKHH_10.0.0/com.ibm.etools.mft.doc/ak04950_.htm
 
 the above infocenter page has got the below for Domain clause asking not  to use it alongside FIELD clause
 
 
 
   
	| Quote: |  
	| If present, the DOMAIN clause associates the new field with a new parser of the specified type. This clause expects a root field name (for example, XMLNS or MQRFH2). If the DOMAIN clause is present, but the value supplied is a zero-length character string, a new parser of the same type as the parser that owns the field specified by target is created. An exception is thrown if the supplied domain name is not CHARACTER data type or its value is NULL. Do not specify the DOMAIN clause with the FIELD clause; it is not certain that a new field is created
 |  |  |  
		  | Back to top |  |  
		  |  |  
		  | pottas | 
			  
				|  Posted: Fri May 03, 2019 4:13 am    Post subject: |   |  |  
		  |  Disciple
 
 
 Joined: 27 Oct 2005Posts: 185
 Location: South Africa
 
 | 
			  
				| Ok... after I posted the above, I went for a coffee, and came back a bit more refreshed, searched this forum further... 
 So I replaced the above erroneous snippets with the following:
 
 
 
   
	| Code: |  
	| CREATE LASTCHILD OF Environment DOMAIN 'XMLNSC' TYPE Name NAME 'Input'; SET Environment.Input      = InputRoot.XMLNSC;
 
 |  
 This worked for me, and my weekend can start.
 
 However, it still bothers me that the IBM documentation seems 'wrong', maybe I am not interpreting it correctly
  |  |  
		  | 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
 
 |  |  |  |