VSAM Dataset Types
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
- Key Sequential Dataset (KSDS).
- Relative record Dataset (RRDS).
- Entry Sequential Dataset (ESDS).
- Linear Dataset (LDS).
The below are the access methods which are used the various types of datasets.
1. Key Sequential Dataset (KSDS) - Indexed Sequential Access Method(ISAM)
Indexed Sequential Access Method is a method for indexing data for fast retrieval and it was originally developed by IBM for mainframe computers.
2. Entry Sequential Dataset (ESDS) - Queued Sequential Access Method(QSAM)
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.
3. Relative record Dataset (RRDS) - Basic Direct Access Method(BDAM)
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.
4. Linear Dataset (LDS)
Linear Dataset is a byte stream data set which is rarely used by the users.
Let’s discuss about each dataset one by one
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.
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.
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.
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.
LDS topic can be explained in detail here .
VSAM Introduction VSAM ESDS