VSAM Dataset Types

VSAM Introduction VSAM ESDS

The VSAM datasets can be divided into three types based on the storage of data and accessing of data.

The below are the different types datasets

  1. Key Sequential Dataset (KSDS).
  2. Relative record Dataset (RRDS).
  3. Entry Sequential Dataset (ESDS).
  4. Linear Dataset (LDS).

Key Sequential Data Set (KSDS):

KSDS is very commonly used dataset among all datasets of VSAM.

Each record has one or more key fields and a record can be retrieved (or deleted or inserted) by key value.

KSDS can be accessed sequentially in the inserted order without supplying any key.

Indexed Sequential Access Method is a method for indexing data for fast retrieval and it was originally developed by IBM for mainframe computers.

KSDS topic can be explained in detail here .

Entry Sequential Data Set (ESDS):

ESDS stores records in sequential order.

In ESDS Records can be accessed sequentially based on the order in RBA value.

In ESDS, Records can be accessed randomly by providing RBA value of the desired record.

Queued sequential access method (QSAM) is an access method to read and write datasets sequentially on Mainframe systems.

QSAM is used both for devices that are sequential, and for data on devices that could also be addressed directly, such as magnetic disks.

ESDS topic can be explained in detail here .

Relative Record Data Set (RRDS):

RRDS allows retrieval of records by number of the record like record 1, record 2, and so forth.

RRDS provides random access.

To access RRDS dataset records, application program has to pass the desired record numbers.

Basic Direct Access Method or BDAM is an access method for System/360 and later mainframes which consists of routines used in retrieving data from, and storing data onto direct access devices.

RRDS topic can be explained in detail here .

Linear Data Set (LDS):

LDS is a byte-stream data set.

LDS is the only form of a byte-stream data set in traditional z/OS files.

LDS used by DB2, z/OS system functions heavily, but rarely used in application programs.

Linear Dataset is a byte stream data set which is rarely used by the users.

LDS topic can be explained in detail here .

VSAM Introduction VSAM ESDS