C-ISAM Files

PRO/5 supports an additional file type (called C-ISAM) on systems that provide a library for accessing and manipulating this file type. As of this writing, the run time modules for INFORMIX C-ISAM files are required. (The READ.ME file will document linkage to other C-ISAM libraries if they are supported in the future.) The manipulation is similar to that of a multi-keyed MKEYED file with the following differences:

  • When the CISAM verb is used to create a single-keyed file (that is, a file with no keydefs), PRO/5 increases the record length by the key size and locates the key at the end of the record. The C-ISAM flag ISNODUPS will be set, indicating that the file has a unique primary key.

  • PRO/5 is designed to work with files that have a unique primary key. When PRO/5 accesses a C-ISAM file that does not have a unique primary key, or has no key at all, the rules below will apply:

    • READ operations will step through the file sequentially, ignoring removed records. EXTRACT operations will extract the next record to be read.

    • A WRITE operation to a file with a record currently extracted will update (replace) the extracted record with the current record.

    • A WRITE operation to a file that does NOT have a record extracted will insert the record.

    • A REMOVE statement must contain a KEY= parameter for syntax purposes, however, the value passed is ignored. KEY="" is valid. If there is an extracted record, that record will be removed. If there is NOT an extracted record, !ERROR=17 is reported.

  • PRO/5 cannot correctly access C-ISAM files with variable length records.

  • An open channel to a C-ISAM file uses a minimum of two file handles (at the operating system level) and two or more file locks. Each OPEN of a C-ISAM file uses both a CIB and an FCB, even if the file is previously open on another channel. C-ISAM files are never cached.

  • The ERASE, OPEN, RENAME, and SELECT verbs must use MODE="CISAM" when attempting to access a C-ISAM file.

  • PRO/5 does not protect against renaming or erasing a C-ISAM file that is in use by another process.

  • Opening a file with MODE="CISAM" on a system that does not have C-ISAM support built into PRO/5 will result in an !ERROR=12_ERROR_12. If C-ISAM support is built into PRO/5 but the INFORMIX libraries are not installed, PRO/5 may issue an !ERROR=54_ERROR_54.

  • SETOPTS Byte 4, Bit $10$ indicates whether PRO/5 was compiled with C-ISAM support (1=YES, 0=NO).

  • A C-ISAM file defined in PRO/5 is not a standard file. Other non-INFORMIX drivers may not be able to access a C-ISAM file that was defined in PRO/5.