Published on Feb 12, 2016


Virtual storage access method ( VSAM ) is an IBM disk file storage access method , first used in the OS/VS2 operating system, later used throughout the Multiple Virtual Storage (MVS) architecture and now in z/OS . Originally a record-oriented filesystem , VSAM comprises four data set organizations : Key Sequenced Data Set (KSDS) , Relative Record Data Set (RRDS) , Entry Sequenced Data Set (ESDS) and Linear Data Set (LDS) . The KSDS, RRDS and ESDS organizations contain records, while the LDS organization (added later to VSAM) simply contains a sequence of bytes with no intrinsic record structure.

Description of Virtual Storage Access Method

IBM uses the term data set in official documentation as a synonym of file , and DASD instead of disk drive .

VSAM records can be of fixed or variable length. They are organised in fixed-size blocks called Control Intervals (CIs) , and then into larger divisions called Control Areas (CAs) . Control Interval sizes are measured in bytes — for example 4 kilobytes — while Control Area sizes are measured in disk tracks or cylinders . Control Intervals are the units of transfer between disk and computer so a read request will read one complete Control Interval. Control Areas are the units of allocation so, when a VSAM data set is defined, an integral number of Control Areas will be allocated.

The Access Method Services utility program IDCAMS is commonly used to manipulate ("delete and define") VSAM data sets.

Custom programs can access VSAM datasets through data definitions (DDs) in Job Control Language (JCL) or in online regions such as in Customer Information Control Systems (CICS) .

Both IMS/DB and DB2 are implemented on top of VSAM and use its underlying data structures.

SKIP-SEQUENTIAL ACCESS is used to retrieve, update, add and delete records in an existing data set. VSAM retrieves selected records, but in ascending sequence of key values. Skip sequential processing allows you to - Avoid retrieving the entire data set sequentially in order to process a relatively small percentage of the total number of records. Avoid retrieving the desired records directly, which causes the index to be searched from top to bottom level for each record For each request the sequence set is used to find the next logical CI and to check if it contains the requested record. If the first skip-sequential search is the first access after opening the data set, a direct search is initiated by VSAM to find the first record. From then on the index sequence set level will be used to find the subsequent records. If other operations were performed before (for example, read sequential), either the last position of that operation will be used as a starting point to search the sequence set records, or a re-positioning is necessary.


Related Seminar Topics