Issue in reading complex flat file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sourabhverma
Participant
Posts: 74
Joined: Thu Jan 05, 2006 2:07 am

Issue in reading complex flat file

Post 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.
Thanks,
Sourabh Verma
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

First line is column headings?

You may need to suppress reading of this row if such is the case.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sourabhverma
Participant
Posts: 74
Joined: Thu Jan 05, 2006 2:07 am

Post 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.
Thanks,
Sourabh Verma
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply