CreateISAM Create all the ISAM files. Short Name CREISAM() Type ISAM function Declaration COUNT CreateISAM(pTEXT filnam) Description CreateISAM() opens the parameter file, whose name is pointed to by filnam, and creates the data and index files specified in the parameter file. Application programs using the ISAM level functions must make a call to CreateISAM(), InitISAM(), or OpenISAM() before any other c-tree Plus functions are used. If any one of these three functions has been called, then CloseISAM() must be called before anyone of them can be invoked again. In part, this implies that no more than one ISAM parameter file may be active at one time. However, the incremental ISAM functions allow for more flexibility in file manipulations. Although it is not recommended, it is possible to use incremental ISAM file opens and creates along with a parameter file. Increase the value of the second parameter in the parameter file, (idxs), by the total number of files used by the incremental routines. For example, if the incremental routines open two additional data files, each with five indices, then the idxs parameter in the ISAM parameter file should be increased by 12. Return
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values. Example TEXT isam_par[64];
scanf("%63s",isam_par);
if (CreateISAM(isam_par)) printf("\n%s files could not be created. (%d %d)",
isam_err,isam_fil); if (CloseISAM()) printf("\nCould not close ISAM.");
if (OpenISAM(isam_par)) printf("\nCould not open ISAM.");
if (CloseISAM()) printf("\nCould not close ISAM.");
} Limitations It is not possible to open some of the files specified in the parameter file and create others. They must all be created by CreateISAM(). However, the incremental ISAM functions permit on the fly opening and closing of ISAM files. If you are adding a new index file to an established set of ISAM files, you should : Update the parameter file to include the new index;
See also CloseISAM(), InitISAM(), OpenISAM(), CreateIFile(), OpenIFile(), CreateISAMXtd() and “ISAM Parameters” of the c-tree Plus Programmer’s Reference Guide, which describes the parameter, file contents. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||