Difference Between VSAM and Sequential Files

Sequential Files

Data Storage

A data set is typically stored on a direct access storage device (DASD) or magnetic tape, however unit record devices, such as punch card readers, card punch, and line printers can provide input/output (I/O) for a data set (file).

Data type

Data sets are not unstructured streams of bytes, but rather are organized in various logical record and block structures determined by the DSORG (data set organization), RECFM (record format), and other parameters.

Dataset Allocation

These parameters are specified at the time of the data set allocation (creation), for example with Job Control Language DD statements.

Inside a job they are stored in the Data Control Block (DCB), which is a data structure used to access data sets, for example using access methods.

For OS/360 or Zo/s the DCB’s DSORG parameter specifies how the data set is organized. It may be physically sequential (“PS”), indexed sequential (“IS”), partitioned (“PO”), or Direct Access (“DA”).

Data sets on tape may only be DSORG=PS. The choice of organization depends on how the data is to be accessed, and in particular, how it is to be updated.


VSAM Files

Access Method

Programmers utilize various access methods (such as QSAM or VSAM) in programs for reading and writing data sets. Access method depends on the given data set organization.

Tape datasets

VSAM files are tape datasets. Sequential files stored on DASD volumes. VSAM is a access method.

Type of Records

VSAM records can be of fixed or variable length. They are organized 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.

Data Definition

Custom programs can access VSAM datasets through Data Definition (DD) statements in Job Control Language (JCL), via dynamic allocation or in online regions such as in Customer Information Control System (CICS).

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

Wedding Gifts

Related Posts

Get new content delivered directly to your inbox.

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.