Indexed KEYEDIO File Attributes

There are two kinds of attributes discussed in this section: file attributes that must be set in a special way when indexed files are created and accessed (FILEORGANIZATION, EXCLUSIVE, BUFFERS, BLOCKSIZE and ACCESSMODE), and attributes that are internal to SYSTEM/KEYEDIO and can only be accessed by the compilers (ISAMKEYS).

To ensure maximum processing efficiency and minimum use of save memory, the BLOCKSIZE and BUFFERS attributes should be set carefully. Refer to the File Attributes Programming Reference Manual for descriptions of these and other file attributes.

Increasing the number of buffers used by KEYEDIO reduces the time needed to process an indexed file at the expense of increased usage of save memory. In contrast, reducing the number of buffers increases processing time and decreases save memory usage.

Increasing the block size to allow for one- or two-level access to data in the indexed file decreases processing time but also increases usage of save memory. Decreasing block size to allow for three- or four-level data access increases processing time and decreases save memory usage.

Consider the needs of your particular installation when choosing BLOCKSIZE and BUFFERS values. Suggestions for how to choose BUFFERS and BLOCKSIZE values are given in the following paragraphs.

Accessing a KEYEDIO file using a record size other than the record size with which the file was created could cause file corruption or faults in the KEYEDIO library. To prevent one of these results, KEYEDIO verifies that the values specified by a program for the MAXRECSIZE and UNITS file attributes are identical to those specified at the time the file was created. If a mismatch is detected, the program is discontinued with the following message:

RECORD LENGTH MISMATCH (FILE MAXRECSIZE=nnn; PROGRAM MAXRECSIZE=mmm)

The value of nnn is the MAXRECSIZE value assigned at file creation, and the value of mmm is the MAXRECSIZE value specified by the program.

To open a file in which the key structure is not known, set the file attribute DEPENDENTSPECS to TRUE and use the procedure ISMGETKEYSTRUCTURE to get key information. See “ISMGETKEYSTRUCTURE Procedure” later in this section for details.