Differences Between ISAM and VSE/VSAM

A number of things that ISAM does are done differently or not at all by VSE/VSAM, even though similar results are achieved. The following describes the areas in which VSE/VSAM and ISAM differ.

Index Structure

Both a VSE/VSAM key-sequenced file and an indexed-sequential file have an index that consists of levels, with a higher level controlling a lower level. In ISAM, either all or none of the index records of a higher level can be kept in storage. VSE/VSAM keeps individual index records in storage during processing, the number depending on the amount of buffer space provided.

Relation of Index to Data

The relation of a VSE/VSAM index to the direct access storage space whose records it controls is quite different from the corresponding relation for ISAM, in particular with regard to overflow areas for record insertion.

ISAM keeps a two-part index entry for every primary track on which a file is stored. The first part of the entry indicates the highest-keyed record on the primary track. The second part indicates the highest-keyed record from that primary track that is in the overflow area, and gives the physical location in the overflow area of the lowest-keyed overflow record from that primary track. All the records in the overflow area from a primary track are chained together, from the lowest-keyed to the highest-keyed, by pointers that ISAM follows to locate an overflow record. Overflow records are unblocked, even if primary records are blocked.

VSE/VSAM does not distinguish between primary and overflow areas. A control interval (CI), whether used or free, has an entry in the sequence set, and after records are stored in a free CI, it is processed in exactly the same way as other used CIs. Data records are blocked in all CIs and addressed, without chaining, by way of an index entry that contains the key (in compressed form) of the highest-keyed record in a CI.

Defining and Loading a File

All VSE/VSAM files are defined in a catalog. Records are loaded into a file with IDCAMS or with the processing program, in one execution or in stages. When loading new records into an empty key-sequenced file, the index is built automatically. IDCAMS does not merge input files. For a key-sequenced file, however, input records are merged in key sequence with existing records of the output file.

Deletion of Records

With ISAM, records cannot be deleted until the file is reorganized; you must mark the records you want to delete.

VSE/VSAM automatically reclaims the space in a key-sequenced file and combines it with any existing free space in the affected CI. VSE/VSAM's use of distributed free space for insertions and deletions requires less file reorganization than ISAM does.