Wednesday, May 27, 2009

1. INTRODUCTION TO VSAM

VSAM stands for Virtual Storage Access Method, is IBM high performance access method which allows you to access files of different organization such as sequential, indexed, relative record and linear datasets.Features of VSAM
VSAM is one coherent file storage system used to store and retrieve data. It is not a database management system like IDMS or DB2. It does not provide for relationships among the data. The existing databases like IMS or DB2 may be implemented using VSAM.
VSAM is not a programming language. But you can access VSAM dataset through programming languages like COBOL or PL/I. It is not a communication system like VTAM or CICS. It has no equivalent for a ‘PDS’ type of file organization.Advantages of VSAM
Provides protection of Data against unauthorized access through password facility.
Cross-system (MVS & VSE) Cmpatibility. VSAM datasets can be imported and imported in MVS and VSE systems.
Device Independence (Access Via Catalog). The application programmer need not be concerned with Block size ,volume and other control information, as access to VSAM dataset it always through the Catalog and all control information are stored in the catalog entry of the dataset.
IDCAMS commands can be included in JCL to handle VSAM datasetsTypes of VSAM DatasetsClusters
VSAM files are often called clusters. A cluster is the set of catalog entries that represent a file. A cluster consists of one or two components. All VSAM datasets consist of a data component in which data records are placed . For KSDS , there is an additional index component, which contains the indexes used to access records in the data component. ESDS RRDS and LDS have data component only and no index component
VSAM clusters are categorized into 4 types based on the way we store and access the records:
ESDS Entry Sequenced dataset.
These are sequential datasets that can be read in the sequence in which they were created. Records can be added only to the end of the dataset.
KSDS Key Sequenced dataset.
These datasets are stored in sequence of some key field in the record. The data component and index component are separated. The keys are stored in a separate index and records are accessed through the index. Individual records can be accessed randomly on the basis of the record key. Locating the record is a two stage process.
• First search for the key in the index• Use the information in the index to locate the record.
RRDS Relative record dataset.
These datasets associate a number to each record. There is no key field but records are accessed by deriving the relative position of the record in the dataset.
LDS Linear dataset. These datasets consist of a stream of bytes which are accessed and written as 4k blocks accessed by Relative Byte Address
VSAM history
VSAM was introducted in 1973. This version had only Entry Sequence Datasets and Key Sequenced Datasets. In 1975 Relative Record Datasets and alternate indexes for KSDS was added. In 1979 DF/EF VSAM was introduced with Integrated Catalog Facility (ICF).
DFP/VSAM Ver 1 was introduced in 1987 to run under the MVS/XA architecture. DFP/VSAM version 2 introduced Linear Datasets (LDS)
DFP/VSAM version 3 was introduced to run under MVS/ESA architecture.In 1991 version 3.3 supported variable-length records for RRDS.

Back to VSAM index


1 comment:

amitdubey said...

Awesome. That was a brilliant post. All the matter was concise , lucid and above all, it covered all the topics relatted to VSAM, that I could think of. It really helped me to clear my concepts. Hope to see more of your posts. Take care. Bye