Re: converting sequential to line sequential
Posted in 1998
Sunil asks [...] >Can somebody tell me how to convert this sequential file to line >sequential file OR is there any way I can load this file to informix >database. [...] >------------------------------ >each record is of 48 charecters >0083980109ZEDAF11 16 3 0 >0083980109ZEDAM11 0 1 0 I wrote an application one time to convert fixed-length strings into columns in a database. It used a temp table with one char(record_length) column into which I loaded the raw data. Then I selected character sub-strings from that temp table and inserted them into the columns of the final table. One could also very quickly write a sed or awk script to insert delimiters into the file at appropriate locations. Note that there is a DBDELIMITER env variable in case you choose to use one other than the default pipe character. More esoterically, if you are using the Universal Data Option you can create a datatype that matches the structure of your original file as well as the functions to manipulate it as though it were a native data type. _____________________________________________________________ Clem Akins (aka clem@informix.com) Informix Software, Inc (Standard disclaimers apply) International Technical Support Last seen: Motorcycling through shady redwood groves near SF