Re: want to read c-isam data
Posted in 1998
On Fri, 26 Jun 1998, Brandon wrote: > Is it possible to read c-isam dat file without even a clue of their > underlying data structure using Informix C-ISAM product? Yes, but it is not completely trivial. You'd have to use the information available from the index file to determine the size of a record, and then read the data from the file into a suitably sized buffer. What you'd do with it after that is up to you -- you'd have to analyze it to work out what the data means. A limited amount of information would be available via the index information -- C-ISAM has to know the types of the fields to be able to index them in order. There are functions which will tell you about the index structure of a C-ISAM file. > Does this product come with a C compiler. No. You have to obtain the C compiler separately, and then buy the C-ISAM product. > Is there any other way to read the data given the above constraint. It depends on which constraint you're referring to. There is no system catalogue for a C-ISAM file which describes the meanings of the fields. indeed, the non-key portions of the records do not have to have a uniform structure, though I've not heard of anybody exploiting this. You can always use cat on the file to see what's in it; or, maybe more sensibly, something like 'od -c' or 'hd'. The active records have a newline at the end; the deleted records have an ASCII NUL '\\0' at the end. You may be able to guess the structure of the data by looking at it, but it isn't easy if you really have no clues as to what is in it. Yours, Jonathan Leffler (jleffler@informix.com) #include <witticism.h> Guardian of DBD::Informix -- see http://www.perl.com/CPAN