Subject Re: [IB-Conversions] ASCII Fixed length to IB Conversion
Author Doug Chamberlin
At 11/24/2001 10:00 PM (Saturday), keng@... wrote:
>Any tips on simplest way to convert my flat file structure (Fixed
>length ASCII cr/lf delimited files). Preferably using prewritten
>utilities rather than having to write conversion routines.

Interbase handles tables which map directly to "external files" for just
this sort of thing. You define the field structure just like you would a
regular table but ensure that it conforms to the field layout of the fixed
length files. You include a "field" which covers the CR/LF bytes at the end
of each record. Finally you declare the table to be associated with an
external file, providing the full path to the file.

Having done all this you can now select from the table and Interbase will
read records right out of the fixed length file. You can now copy the data
to another table and otherwise manipulate it using SQL operations. Some SQL
scripts, with judicious data conversions included via CAST() operations,
should work well.

If you are lucky then that's all you need to do to import the table into an
Interbase database. Check into "external files" in the Interbase documentation.