Wednesday 10 April 2019

VSAM - Virtual Storage Access Method Concepts.

VSAM Concept
Virtual Storage Access Method which is popularly known as VSAM. VSAM is one of several access methods in z/OS. It applies only to data stored on direct access storage devices (DASDs). 

VSAM access method is used for indexed files on an IBM mainframe. It was introduced by IBM in the 1970s. This access method makes it easier for an application to run an I/O operation (moving data between an I/O device and memory)

It is a high-performance access method used to organize data in the form of files in Mainframes.

The word virtual means only that VSAM was introduced at approximately the same time as the initial IBM virtual storage operating systems OS/VS1 and OS/VS2. Since then VSAM has been continually improved and enhanced.

It provides a catalog facility that can be used for both VSAM and non-VSAM files. And it provides a multi-function utility program called Access Method Services (AMS) that lets you perform a variety of functions for VSAM as well as non-VSAM files.




VSAM
IBM Mainframe Architecture.


Type of Data set:


VSAM data sets are broadly categorized into 4 categories.
  1. ESDS: Entry-sequenced data set (ESDS), the records are stored one after the other in consecutive disk locations. On other platforms, this is called a sequential file.To retrieve records from a sequential file, you must read them sequentially by disk location. This type of record retrieval is referred to as sequential access.
  2. KSDS: A key-sequenced data set (KSDS) consists of two parts: an index component and a data component. Within the index component, each entry contains a key field value that points either to a lower-level index or to a record in the data component of the file. On other platforms, this type of data set is called an indexed file.
  3. RRDS: A relative-record data set (RRDS) consists of record areas that can contain one record. Each of these areas is identified by a relative record number that indicates its relative position in the file. On other platforms, this type of data set is called a relative file.
  4. LDS: A Linear data set (LDS) contains data that has no record boundaries. Linear data sets contain none of the control information that other VSAM data sets do. Linear data sets must be cataloged in an integrated catalog facility catalog.
Salient Feature: 
  • The retrieval of records is faster because of an efficiently organized index. The  index is small because of key compression algorithm used to store and retrieve records
  • Embedded free space makes the insertion of records easy  and  therefore requires less reorganization
  • The deletion of records means that they are physically deleted thus allowing the reclaiming of free space within data sets
  • Records can be accessed randomly by key or address  and can also be accessed sequentially at the same time
  • VSAM data sets can be shared across partitions, regions, address space and systems. The type and level of sharing can be controlled thru AMS and JCL
  • VSAM provides data security thru passwords protection of data sets at various levels like reading an update.
  • VSAM provides the ability to physically distribute datasets over various volumes based on key ranges.
  • VSAM data sets are device  independent

Drawbacks:
  • Free spaces, hence more disk space
  • The integrity of VSAM data sets in cross systems and cross regions sharing   must be controlled by the User.


Have a look of Top 20 Interview Questions for VSAM (Virtual Storage Access Method)..

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete

New In-feed ads