Author |
Message
|
Tonedef |
Posted: Mon Feb 26, 2007 4:29 am Post subject: XML message to Fixed length |
|
|
Apprentice
Joined: 05 Feb 2007 Posts: 44
|
I'm looking for some advice on the best way to change an XML message into a fixed length flatfile.
I tried the ResetcontectDescriptor node and setting the message set etc in ESQL. but didn't work just gave me XML out.
I'm using XML to CWF.
data In
<MESSAGE>
<REC_1>
<ELEMENT1>DATA1</ELEMENT1>
<ELEMENT2>DATA2</ELEMENT2>
<ELEMENT3>DATA3</ELEMENT3>
</REC_1>
</MESSAGE>
data Out(padded with spaces
DATA1 DATA2 DATA3<LF>
next records |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 26, 2007 4:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
You're probably going to need a compute or mapping node (or similar) to change the format like that. I'm assuming you already have a message set defined for the output as you mention setting it in the ESQL.
You'll find advice on syntax, use, etc in the Info Centre.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Tonedef |
Posted: Mon Feb 26, 2007 6:33 am Post subject: |
|
|
Apprentice
Joined: 05 Feb 2007 Posts: 44
|
Thanks,
was simple really, needed to make a few changes to the message tree, to allow nilable element REC_1 etc ..
then use,
SET OutputRoot = InputRoot;
SET OutputRoot.Properties.MessageFormat = 'CWF';
jobs a good 'un
unless someone has a better solution. |
|
Back to top |
|
 |
broker_new |
Posted: Mon Feb 26, 2007 8:19 am Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
Set these values in the Compute Node
SET OutputRoot.Properties.MessageSet ='MessageSetID of CWF MessageSet';
SET OutputRoot.Properties.MessageType='InputMessage';
SET OutputRoot.Properties.MessageFormat='CWF1';
And map the required fileds from the InputRoot to the OutputRoot; _________________ IBM ->Let's build a smarter planet |
|
Back to top |
|
 |
Tonedef |
Posted: Wed Feb 28, 2007 9:21 am Post subject: |
|
|
Apprentice
Joined: 05 Feb 2007 Posts: 44
|
Thanks,
just to add, some how the parser had been set XML changing it to MRM did the trick. |
|
Back to top |
|
 |
|