Page 1 of 1

Issue in reading complex flat file

Posted: Thu Aug 07, 2008 11:23 pm
by sourabhverma
Hi All,

I am having one flat file which looks like :

FUND CODE1 HDFC BANK FUND CODE HDFC FUND CODE DESCRIPTION
HOLD 1 HOLDING 1 CODE1 40 1 40 GBP
.......
.......

likewise there are no . of records in the file . there are two record type in the file FUND & HOLD. FUND record type is having 4 columns while HOLD record type is having 8 columns .Now i am trying to read this file & spliting into two seq files based on the record type. i have used CFF stage & defined everything in the stage but when i try to view data following error is coming :

:Short input record
<Complex_Flat_File_0,0> Import warning at record 0.
<Complex_Flat_File_0,0> Import unsuccessful at record 0.
<Complex_Flat_File_0,0> Import complete; 0 records imported successfully, 1 rejected.
and so on for rest of the records.

what should be done to avoid the errors....
Any help is appreciated.

Posted: Fri Aug 08, 2008 12:12 am
by ray.wurlod
First line is column headings?

You may need to suppress reading of this row if such is the case.

Posted: Fri Aug 08, 2008 1:54 am
by sourabhverma
Thanks Ray,

No the first line is not column headings,it`s the actual data. Supressing the data mean removing the spaces between column values.
This is what you meant to say w.r.t supressing ? Ray , can we specify the delimiter in this scenario.

Posted: Fri Aug 08, 2008 2:51 am
by ray.wurlod
Then your metadata do not correspond to what's in the file, or you have not indicated in the CFF stage which field identifies the record type. With multiple record types I presume you have set up separate output links for each?