Re: CONVERT C-ISAM FILES
Posted in 1998
On Thu, 20 Aug 1998, Christophe BADET wrote: > I SEARCH A TOOL TO CONVERT C-ISAM FILES TO ASCII. There isn't any such tool as standard, simply because there is no information in the C-ISAM file about the field structure of the ISAM file. There is limited information about indexed fields in the index descriptions, but that's about all. It shouldn't be hard to write a tool which, given a data structure description for the file, actually reads the data out and reformats it cleanly. The hardest part is cleanly parsing the structure description. The next hardest part is validating the parsed description against what is known from the index file - that requires the C-ISAM library, whereas the rest of the code does not. The main loop simply does a sequential scan on the data file, discarding deleted records and dumping the others suitably reformatted. Oh, there's one real nasty trick -- if the C-ISAM file has variable length records, the variable part is stashed away in the index file. In that case, you need to have C-ISAM kicking around, and you'll read the records using C-ISAM (isread, I guess). This would never be a problem in C-ISAM files also used by SE as those always have fixed-length records. You'd be best off with C-ISAM available to validate whether the file has variable-length records. No, just for once I don't have such a tool on hand -- noone's offered to make it worth my while to write one and I don't need it for my own work. Yours, Jonathan Leffler (jleffler@informix.com) #include <witticism.h> Guardian of DBD::Informix v0.60 -- http://www.perl.com/CPAN Informix IDN for D4GL & Linux -- http://www.informix.com/idn