Skip to Content
0
Former Member
Dec 04, 2009 at 05:52 AM

Key Field Value in FCC

563 Views

Hi Experts,

I have a scenario in PI, where I have 1 Header, n Data Records and 1 Trailer in the source file. This data is coming in CSV format.

I am using FCC to convert CSV into XML.

In the FCC, I have used keyFieldValue parameter. For the Header Record, the Key Field Value is constant "H"; for Trailer Record the key field value is constant "T".

However for Data Record, the key field value is not constant. The first character of Key field of Data Record will always be "D", but rest of the Alphabets can change.

Sample File:

"H","3.04",22/10/2009,16:31:12
"D2S",21/10/2009,20:00:26,"20044",00666,"S",1
"D2S",22/10/2009,14:26:20,"20044",00668,"S",1
"D0S",22/10/2009,08:33:34,"00044",04165,"S",1
"D0S",22/10/2009,11:59:59,"00044",04166,"S",1
"T",1393.27,1393.27,8

Here, first line is Header Line (Key Field Value "H"), Last Line is Trailer Line (Key Field Value "T") and all lines in between Header and Trailer are Data Records (Key Field Value starts with "D). I need to convert this file into XML.

I have no clue, if this can be converted into XML through FCC.

Any help will be highly appreciated.

Regards,

Varun