cancel
Showing results for 
Search instead for 
Did you mean: 

File to Proxy: FCC and mapping to generic proxy target structure

Former Member
0 Kudos

Hi experts,

I have a question regarding a File to Proxy scenario which uses FCC.

We have a source file which contains different rows of different structure, like:

HDR:123:Test:783:1000:20130101:HBA’

REC1:Test:20130404:Description’

REC1:Test:20130820:Description2’

REC2:GBR:Test:20130810’

The number of record types can vary (except the HDR record which only occurs once).

The XML structure after FCC looks as follows:

<Header>

     Contains HDR record type fields

</Header

<Item_REC1>

     Contains REC1 record type fields of occurrence 1 in file

</Item_REC1>

<Item_REC1>

     Contains REC1 record type fields of occurrence 2 in file

</Item_REC1>

<Item_REC2>

     Contains REC2 record type fields of occurrence 1 in file

</Item_REC2>

This file needs to be transferred into a generic proxy structure which has one header and a 1:n sub-structure which holds a subset of all fields of all different record types REC1, REC2, REC3, etc.

The format looks as follows:

Header                           (should hold HDR record)

   |__Item 1                   (should hold all other record types, like REC1, REC2, REC3, etc.)

   |__Item 2

   |__Item 3

As mentioned sub-structure Item contains specific fields of all record types, means all record types (except HDR) need to be mapped to this generic structure.

How do I achieve this?

Thanks a lot for your help.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

May be you can read each line into separate node and then handle the conversion during the message mapping.

Refer to Greg's reply in the below thread.

You can make use of start with function to identify which record-set it belongs to..

Former Member
0 Kudos

Hi Hareesh,

Could you please provide me with some more details?

Thanks and Best Regards

Harald

former_member184720
Active Contributor
0 Kudos

Hi Harald -

What i meant was, read the entire line into a string so that your xml should be something like

<fileline>

<line>HDR:123:Test:783:1000:20130101:HBA</line>

</fileline>

<fileline>

<line>REC1:Test:20130404:Description</line>

</fileline>

<fileline>

<line>REC1:Test:20130820:Description2</line>

</fileline>

and then during the graphical mapping, you can identify which record type the line belong to.

If the line starts with HDR then apply your mapping rules accordingly and map it to proxy structure's header segment.

Former Member
0 Kudos

So you wouldn't use FCC to split the records into a new structure for each record type, but rather use FCC to just create a line for each record . The splitting of each line bases on the separator ":" is then done in the mapping afterwards, correct?

former_member184720
Active Contributor
0 Kudos

Exactly

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If you know what kind of records of you are getting, then you can use FCC with key field. In mapping, duplicate the Item node for each source record type. I hope this helps.