Skip to Content
0
Former Member
Nov 22, 2008 at 03:02 AM

Replicating header values in text file payload for each recordset

15 Views

Hello everyone,

I have a configured a Sender File Adapter that uses Content Conversion to translate a text file into XML.

Currently, one message is created for each groupings of B, C, and D (see below). A is the header portion.

example.txt

A 20081010

B 0100012

C 234

D 0000001

B 0100013

C 235

D 0000002

Using the above text file as an example, I get two messages generated:

Output 1
<Recordset>
<Header>
	<A>20081010</A>
</Header>
<Details>
	<B>0100012</B>
	<C>234</C>
	<D>0000001</D>
</Details>
</Recordset>

Output 2
<Recordset>
<Details>
	<B>0100013</B>
	<C>235</C>
	<D>0000002</D>
</Details>
</Recordset>

However, I want the output to replicate the value in A to the header portion of each of the succeeding messages:

Desired Output 1
<Recordset>
<Header>
	<A>20081010</A>
</Header>
<Details>
	<B>0100012</B>
	<C>234</C>
	<D>0000001</D>
</Details>
</Recordset>

Desired Output 2
<Recordset>
<Header>
	<A>20081010</A>
</Header>
<Details>
	<B>0100013</B>
	<C>235</C>
	<D>0000002</D>
</Details>
</Recordset>

Can anyone help me out?

Kind regards,

Glenn