Skip to Content
0
Former Member
Jun 28, 2011 at 01:42 PM

Mapping to a multiple record structure

15 Views

Hello, I'm working on a scenario that requires me to map source message (with 1 structure) to a target message with only 1 header record, multiple detail records and 1 trailer record at the end. All the records in the source message has to go to the target (file) as one message. The source and target message structure are similar to what is shown below:

-


Source Message:

<Source>

<Order>

<OrderNo>1</OrderNo>

<Description>This is Order 1</Description>

</Order>

<Order>

<OrderNo>2</OrderNo>

<Description>This is Order 2</Description>

</Order>

<Order>

<OrderNo>n</OrderNo>

<Description>This is Order n</Description>

</Order>

</Source>

-


Target (File) Record structure:

H This is the Header Record

D 1 This is Order 1

D 2 This is Order 2

D n This is Order n

T number of records n

-


I'm wondering how to map from the source structure to the target structure. Any input in this regard is appreciated.

If there is a blog detailing how this scenario has to be handled, please let me know.

Thanks!