Module 2: VSAM Concepts
VSAM Overview
- VSAM stands for Virtual Storage Access Method and it was introduced by IBM in 1970’s.
- As name suggests, it is an access method intended to function in a virtual storage environment of MVS, z/OS.
- VSAM is high performance access method and acts as an interface between application program and physical operation of storage devices.
- VSAM’s role is to provide an easiest way for program to store/retrieve data to/from an external device without concerning about physical details of transferring data bytes between program and I/O devices.
- VSAM can be used in COBOL or CICS in the mainframe for data manipulation on files
- VSAM facilitates both sequential and random processing
- IBM introduced VSAM as a replacement for several existing access methods provided by it earlier
- KSDS (Key Sequenced Data Set) to replace ISAM (Indexed Sequential Access Method)
- ESDS (Entry Sequenced Data Set) to replace PS/QSAM(Queued Sequential Access Method)
- RRDS (Relative Record Data Set) to replace BDAM (Basic Direct Access Method)
- KSDS, ESDS and RRDS mentioned above are types of VSAM data organization and will be explained later in this module
Advantages of VSAM over other Access methods
- VSAM logically structures and organizes data more properly and thus enables faster access to data
- Data retrieval can be sequential, random or dynamic
- Portable across systems i.e. VSAM dataset and catalogs cab be easily transported between operating systems
- VSAM can be made password protected to avoid unauthorized access
- Deletion of records are done at physical level (not logical level). Thus, free space is more easily available
- Supports alternate index
- One versatile utility, IDCAMS, to manage all file operations
- AMS commands can be executed as TSO commands
- Batch and on-line processing is supported
- VSAM is provided with performance parameter which helps in optimizing performance
Disadvantages of VSAM
- VSAM occupies more storage space as compared to other type of datasets; this is because VSAM data set also holds control information in them, in addition to the actual data that they contains.
- VSAM cannot be stored on TAPE volume. It is always stored on Disk i.e. DASD storage.
- Since it requires number of cylinders to store data which makes it less cost-effective
- For KSDS, primary key cannot be changed
- VSAM are device independent but Integrity of data across region and system has to be controlled by user
VSAM Terminologies and Concepts
- CLUSTER
- Data component
- Control Interval (CI)
- Control Area (CA)
- Index component
- Sequence set
- Index set
- Data component
- VSAM Splits CI Split and CA Split
- Spanned records
Each of them are explained in detail in upcoming aricles