Reg. Fixed Length Flat file

Hi All,

The file which i am trying to process is fixed length. Each record in the file has fixed length (Length = 10). In this file Header & Trailer occur only once. Details record can appear many times.

Header (record id = “1” , Cust ID= “12345” , Date= “2507” )
Details (record id = “2” , Item Name= “APPLE” Qty=“10KG” )
Details (record id = “2” , Item Name= “ORANG” Qty=“01KG” )
Trailer (record id = “3” , Total amount = “00590” Ship Date = “2507” )

Fixed length for each record = 10

File looks like

1123452507
2APPLE10kg
2ORANG01kg
3005902507

I want to process this now. creating a schema and dictionary. How to do that…

Yours urgent help is appreciated. Thanks in advance.

Regards,
Amit

Hi I cud solve this issue.

But the problem lies as stated below.

1123452507
2APPLE10kg
250706ACPT (DDMMYY, accepted = ACPT)
2ORANG01kg
250706REJT (DDMMYY, Rejected = REJT)
3005902507

All other record cud be identified with the help of Record ID at the start of string. How will i recognize the DDMMYY receord following the Record no 2.
also this wud interfere with record no : 2 at times.

Please help.

Regards
Amit

Amitm,

Since this is fixedposition flatfile you have to identify each of the fields length and specify in the field definitions (start,end positions) in the FFSchema this way your date field can be resolved and flat file can parse success.

HTH,
RMG

Hi RMG,

Thanks for your suggestion.
All other records could be mapped to record in the schema as we have the record with the same name - as first position of the file.
( So first position is as record identifier )
But when we come to record satrting with ddmmyy what could be the record identifier. how whud we go ahead. I am not able to solve this.

Also let me know

If the record identifier in the ddmmyy record come in the last position how should i go ahead.

(For all other records it is in first position & for this one at last)

Please help me with some code or example if possible.

Thanks a lot for your help.

Regards,
Amit

Are you sure your record starts with ddmmyy (dateformat) field?? If yes use recordWithNoID as record definition and extract the date as field definition (start,end positions using fixed length option)

HTH,
RMG