VSAM (Virtual Storage Access Method) is a data access method used with IBM Mainframe running in MVS operating System. VSAM provides data security and data integrity. Whenever we require fast access to data set, VSAM is needed
What are Control Interval and Control Area?
They are VSAM Dataset Storage Formats. The records in a VSAM Dataset are stored in the form of Control Intervals. A Control Interval is similar to a block in that it contains several records, but it contains free space as well. When you create a dataset you can specify free space in two ways, as a percentage of each control interval to leave free and as a percentage of the total control intervals to leave free.
Set of control Intervals is known as Control Area.
What are the types of VSAM Data Set?
1) KSDS (KEY-SEQUENCED DATASET) – Each Record in a KSDS data file is embedded with a unique key
2) ESDS (ENTRY-SEQUENCED DATASET) – The records are accessed in the order they were written to the file i.e. based on their sequential order
3) RRDS (RELATIVE RECORD DATA SET) – Records are in relative to the relative record number
4) LDS (LINEAR DATA SET) – LDS contains data that can be accessed as byte addressable strings in virtual storage. LINEAR DATA SET is one big data object, which do not have Control Information
What are the benefits of VSAM?
1) VSAM is quick and efficient in retrieving data
2) Records are accessed via a key, relative address or sequentially
3) By the use of embedded free space insertions of records is made easier
4) Deleting the records physically is easier
5) They are portable across systems
6) Data Security is enforceable at different levels.
What are the drawbacks of VSAM?
1) User must control the integrity of VSAM datasets in a cross system
2) The biggest disadvantage of VSAM is the use of free space
What are some common VSAM error conditions and code?
1) End of file (10)
2) Duplicate key (22)
3) Record not found (23)
4) VSAM logic error (90)
5) Open Problem (92)
6) Space Problem (93)