cancel
Showing results for 
Search instead for 
Did you mean: 

Sender File Content Conversion with headerline

Former Member
0 Kudos

Hi,

Is it possible to do via the sender file content conversion in the file adaptor for the following flat file?

Inbound flatfile format:-

FILEHEADER

HEADER1

DETAILS1

DETAILS2

DETAILS3

HEADER2

DETAILS1

DETAILS2

DETAILS3

Target XML file format:-

<XML>

<FILEHEADER></FILEHEADER> occurrence 1

<RECORDSET> occurence *

<HEADER></HEADER> occurence 1

<DETAILS></DETAILS> occurence *

</RECORDSET>

</XML>

Edited by: Bee Huat, Leonard Yong on Oct 16, 2008 10:52 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Use FCC as mentioned in this blog.

Regards,

Sarvesh

Answers (4)

Answers (4)

Former Member
0 Kudos

Decided to drop the file header completely, thanks.

Former Member
0 Kudos

I've read through all the blogs, and have no leads on how to get this done?

I tried putting the following into the recordset. FileHeader, 1, Header, 1, Details, *

But it does'nt seem to work, the above is expecting the Fileheader and header to be repeated in the file to be sent.

My file is in the following format.

Fileheader

Header1

Details1

Details2

Details3

Header2

Details1

Details2

Details3

I need the following XML format

<XML>

<Fileheader>

<invoice>

<header1>

<details1>

<details2>

<details3>

</header1>

</invoice>

<invoice>

<header2>

<details1>

<details2>

<details3>

</header2>

</invoice>

</XML>

Edited by: Bee Huat, Leonard Yong on Oct 16, 2008 5:34 PM

Former Member
0 Kudos

Hi

Use Recorder Name : Recordset

and Use Recordset Structure as FileHeader, 1, Header, 1, Details, *

Doing FCC use ignoreRecordsetName as true.

You can convert the above structure

Thanks

Gaurav

VijayKonam
Active Contributor
0 Kudos

You should use your header also as *. Also set Recordset Sequence to Ascending. You are done.

VJ

Former Member
0 Kudos

Hi

Use Recorder Name : Recordset
and Use Recordset Structure as FileHeader, 1, Header, *, Details, *

Doing FCC use ignoreRecordsetName as true. 

Modified code

Try it

Thanks

Gaurav

Former Member
0 Kudos

Hi,

Sorry, I think my question is unclear, is it possible for FCC to convert into the following XML with 1 header line <FILEHEADER>, and than another RECORDSET <INVOICE>?

FILEHEADER

HEADER1

LINEITEMS1, FIELD1, FIELD2

HEADER2

LINEITEMS2, FIELD1, FIELD2.

<XML>

<FILEHEADER>

</FILEHEADER>

<INVOICE1>

<HEADER>

</HEADER>

<LINE ITEMS1>

<FIELD1></FIELD2>

<FIELD2></FIELD2>

</LINEITEMS1>

<LINE ITEMS2>

<FIELD1></FIELD2>

<FIELD2></FIELD2>

</LINEITEMS2>

</INVOICE1>

<INVOICE2>

<HEADER>

</HEADER>

<LINE ITEMS1>

<FIELD1></FIELD2>

<FIELD2></FIELD2>

</LINEITEMS1>

<LINE ITEMS2>

<FIELD1></FIELD2>

<FIELD2></FIELD2>

</LINEITEMS2>

</INVOICE2>

</XML>

Former Member
0 Kudos