cancel
Showing results for 
Search instead for 
Did you mean: 

content conversion of "property file" like files

Former Member
0 Kudos

Hello,

I have to process a text file by XI (FTP Sender Adapter)

having several sections :

Header: "property file" like format

Data : "property file" like format + CSV format

Footer : "property file" like format

And also some lines between sections that should be ignored.

For example

-


START OF FILE

START OF HEADER

Property1=aaaaaaaaaa

Property2=bbbbbbbbbb

...

PropertyN=zzzzzzzzzz

END OF HEADER

START OF DATA

PropertyX1=aaaaa,bbbb,cccccc,ddddd

PropertyX2=eeeee,ffff,gggggg,hhhhh

END OF DATA

END OF FILE

-


Do you have an idea how to parse these kind of files?

Thanks,

Bela

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member206604
Active Contributor
0 Kudos

Hi,

1. Either you can read the whole file and using Adapter module you can split and form the XML

2. You can read the whole content in one field and split it using Java/ABAP of Graphicl using UDF.

3. Try this

use beginSeparator = START OF HEADER

endSeparator = END OF HEADER

and fieldSeparator as 'nl'

In the mapping do a substring and remove "Property1=" and get only the value

Just an idea

Regards

Prakash

Former Member
0 Kudos

Hi,

Please look at this weblogs:

/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1

/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

for randor file that does not have keyfieldvalues you can use

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

Regards

Vijaya