cancel
Showing results for 
Search instead for 
Did you mean: 

Flat file writing

Former Member
0 Kudos

Hello All,

Below is the flat file output:

HEADER1

LINE ITEM1

LINE ITEM2

==

==

HEADER2

LINE ITEM3

LINE ITEM4

==

==

TRAILER

When PI is reading the above flat file below is xml structure generating:

<HEADER1>

<LINEITEM1>

<LINEITEM2>

==

<HEADER2>

<LINEITEM3>

<LINEITEM4>

==

<TRAILER>

Till now everything is working fine. In my message mapping I am performing some validations after that I am trying to write the same Input file in the same structure. But I am getting flat file in below format:

HEADER

HEADER

LINE ITEM1

LINEITEM2

LINEITEM3

==

===

I am expecting in same Input format i.e. as below:

HEADER1

LINE ITEM1

LINE ITEM2

==

==

HEADER2

LINE ITEM3

LINE ITEM4

==

==

TRAILER

How can I get the above structure?

Accepted Solutions (1)

Accepted Solutions (1)

Harish
Active Contributor
0 Kudos

Hi,

you can convert the strucutre to flat file in File adapter using conversionType as "StructPlain2XML". And as you Lineitem are comming in variable sequence you need to use the parameter:

xml.recordsetStructureOrder - var

Regards,

Harish

Former Member
0 Kudos

Hello Harish,

Where should I need to mention xml.recordsetStructureOrder - var in receiver file channel?

Regards,

Moorthy

Harish
Active Contributor
0 Kudos

Hi Moorthy,

You can mention this parameter in sender and receiver both channels. If you want to convert the flat file in same order after FCC you need to mention in Sender channel.

Regards,

Harish

Shabarish_Nair
Active Contributor
0 Kudos

did you have a chance to go thru this? /people/shabarish.vijayakumar/blog/2010/01/14/file-conversion-using-nodeception

Also look into the comment section where there is a FCC parameter mentioned for simple hierarchies.

Answers (3)

Answers (3)

Former Member
0 Kudos

Create ur structure as

Record

-


Header

-


LineItem

-


Trailer

Record will group Header. LineItem and Trailer.

In FCC recordset structure mention Header,LineItem and Trailer

former_member181962
Active Contributor
0 Kudos

Hi Murthy,

YOu can use this nice little trick by Shabarish:

/people/shabarish.vijayakumar/blog/2010/01/14/file-conversion-using-nodeception

Best Regards,

Ravi

former_member854360
Active Contributor
0 Kudos

Hi Moorthy,

You need to perform FCC in receiver adapter.

the FCC structure should be.

Header,Line,*,Trailer