Re: Importing cIsam files
Posted in 1995
>From: kcj@netcom.com (Kate Juliff) >Date: Thu, 15 Jun 1995 01:22:18 GMT >X-Informix-List-Id: <news.14685> > >Can anyone tell me how to import C-Isam files into an >Informix database? >Thanks, >Kate Depends on what you have available to you in the way of tools and information about the C-ISAM files, and on whether the files are rigidly formatted or not. If they aren't rigidly formatted (parts of the records have variant data structures, which is possible but highly unrecommended), forget the whole process*. This is unlikely to be a problem. If there is a mechanism for unloading the data into an ASCII format, preferably delimited fields, but possibly using a fixed format, then the simplest way is to unload the data from the C-ISAM files and reload into the Informix database. If the target database is OnLine, this is the only way to go. If the target database is SE and the C-ISAM files have a format which is usable by SE and you know what it is, then you can, with great care and some luck and a good deal of fiddling, create a set of tables which describe the C-ISAM file structure. You then arrange to copy the actual C-ISAM data files over the SE-created ones and hey presto, you have access to the data. If the data in the C-ISAM files is incorrectly formatted, or if the indexes on them are not correct, this won't work. Note that you should have been using the correct techniques to store integers in a machine-independent format in the C-ISAM files, and any C float or double data means that the C-ISAM files cannot be transported between different hardware types, and so on. You'll need to check whether the index info in the SE-created C-ISAM files matches the index info in the C-ISAM files you want to load. If you don't have access to C-ISAM, you can try it blind, but it probably won't work properly. You may be able to select the data with an unordered, unconstrained select and then transfer it to a proper SE table, but I wouldn't want to bet on it. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> * Well, you may be able to use the files, but it is going to involve writing special C-ISAM programs to unload the data selecting the different variant types into different output files, and the database will have different tables for the different variants, and it's all horrible...