|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
tds to xml - input msg showing up in XMl. |
« View previous topic :: View next topic » |
Author |
Message
|
cjvaz |
Posted: Mon Jul 10, 2006 7:34 am Post subject: tds to xml - input msg showing up in XMl. |
|
|
Newbie
Joined: 06 Jul 2006 Posts: 3
|
I have a flow that goes from TDS to XML. Flow takes a comma delimited file as input and propagates a message for each line of input as XML. I am getting the correct output in XML, however, the output also contains the contents of the input msg and I'm not sure how to get rid of it.
eg input msg: 129383,33,A,FJFIKR
this is my output msg:
129383,33,a,FJFIKR
<tr_recs>
<test1>129383</test1>
<test2>33></test2>
<test3>A</test3>
<test4>FJFIKR</test4>
<tr_recs>
The input msg shows up in the first line of the output.
Simple flow: MQinput --> Compute --> MQOutput
ESQL:
DECLARE i INTEGER 1;
WHILE i <= CARDINALITY(InputRoot.MRM.tr_recs[]) DO
SET OutputRoot = InputRoot;
SET OutputRoot.XML = NULL;
SET OutputRoot.XML.tr_recs = InputRoot.MRM.tr_recs[i];
SET OutputRoot.Properties.MessageFormat = 'XML';
PROPAGATE;
SET i = i+1;
END WHILE;
RETURN FALSE; |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 10, 2006 7:42 am Post subject: Re: tds to xml - input msg showing up in XMl. |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
cjvaz wrote: |
I
DECLARE i INTEGER 1;
WHILE i <= CARDINALITY(InputRoot.MRM.tr_recs[]) DO
SET OutputRoot = InputRoot;
SET OutputRoot.XML = NULL;
SET OutputRoot.XML.tr_recs = InputRoot.MRM.tr_recs[i];
SET OutputRoot.Properties.MessageFormat = 'XML';
PROPAGATE;
SET i = i+1;
END WHILE;
RETURN FALSE; |
The highlighted line will copy everything from the InputRoot, ijncluding the MRM message tree I suspect. I think you just want to copy the headers..... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jul 10, 2006 2:29 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
And if you're using 2.1, please upgrade! _________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|