cancel
Showing results for 
Search instead for 
Did you mean: 

Strange file format - File Format Conversion - Sender

Former Member
0 Kudos

Hi, sdners!

I have a requirement where File adapter has to pick a file with a stranger format than usual.

This is the format:

value1value2value3...valuen

_____value2value3....valuen

value1value2value3...valuen

_____value2value3....valuen

_____value2value3....valuen

_____value2value3....valuen

For example:

20081206invoice0101$54,07

________invoice0102$74,00

20081205invoice0100$07,87

________invoice0099$81,90

________invoice0098$40,48

________invoice0097$41,23

and has to convert it to:

<Row>

<date>20081206</date>

<items>

<description>invoice0101</description>

<amount>$54,07</amount>

</items>

<items>

<description>incoice0102</description>

<amount>$74,00</amount>

</items>

</Row>

<Row>

<date>20081205</date>

<items>

<description>invoice0100</description>

<amount>$07,87</amount>

</items>

<items>

<description>invoice0099</description>

<amount>$81,90</amount>

</items>

<items>

<description>invoice0098</description>

<amount>$40,48</amount>

</items>

<items>

<description>invoice0097</description>

<amount>$41,23</amount>

</items>

</Row>

How do you think I should deal with it? I thought about file content conversion, but it is not a common format

Any help is really apreciated

Regards,

Federico

Edited by: federico urones on Dec 6, 2008 7:40 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi, Ivan! Thanks for the reply.

Yes, it is fixed positions, but the problem was that I was not able to determine how the file adapter separated one row from another. I solved by using KeyField, with value '2' (2 was from 2008, 2009,...)

Thread Solved!

Former Member
0 Kudos

Hi Federico

Well, As I can see, You are are handling with a file content with fixed positions, let me tell You that is so common. So I give a link for more information.

I hope It helps You.

Ivan

Edited by: Jose Iván Reyes Arteaga on Dec 7, 2008 5:21 AM