ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » tds to xml - input msg showing up in XMl.

Post new topic  Reply to topic
 tds to xml - input msg showing up in XMl. « View previous topic :: View next topic » 
Author Message
cjvaz
PostPosted: Mon Jul 10, 2006 7:34 am    Post subject: tds to xml - input msg showing up in XMl. Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Jul 10, 2006 7:42 am    Post subject: Re: tds to xml - input msg showing up in XMl. Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Mon Jul 10, 2006 2:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » tds to xml - input msg showing up in XMl.
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.