Re: Want to read C-ISAM data
Posted in 1998
Topics: Licensing & Editions, Third-Party Tools & Monitoring
Brandon wrote: > Is there a quick and dirty way to read Informix C-ISAM dat file and > probably saved as text file without using Informix C-ISAM software > product on SCO Unix machine? Well, the data in the .dat file consists of fixed-length records (in general -- if you've got variable length records, forget this advice) delimited by either a newline NL '\\n' (indicating a current record) or an ASCII NUL '\\0' (indicating a deleted record). So, you can read the data into a buffer N bytes at a time (where N is the length of a single record plus 1 for the trailing NL/NUL, discarding any records where the trailing character is NUL. How you then process the data into your text file depends on the structure of the data in the C-ISAM file. If it is all character fields, it is pretty easy. If you've got integer or float fields, life gets more complex; if you've got decimal fields, life gets very complex. But that's about the only way to do it without buying a C-ISAM licence. Yours, Jonathan Leffler (jleffler@earthlink.net) #include <amnesia.h>