VSAM Interview Questions (21 - 30)

21. How many buffers are allotted to VSAM KSDS and ESDS?

By default:

  • ESDS: Allocates one data buffer.​
  • KSDS: Allocates two data buffers and one index buffer.

Each buffer is typically about 4 KB in size.

22. How are records stored in an ESDS (Entry Sequenced Data Set)?

In an ESDS, records are stored sequentially in the exact order they are written to the dataset. There is no indexing or key field; each new record is simply appended to the end of the dataset.​

23. What is a Sequence Set?

The Sequence Set is a part of the KSDS index that contains pointers to each Control Interval (CI) within a Control Area (CA). It helps in locating the specific CI that contains the desired record.

24. Is a delete operation possible in an ESDS?

No, you cannot delete individual records in an ESDS. Once a record is written, it remains in the dataset. To remove records, you would need to copy the desired records to a new dataset, excluding the ones you wish to delete.

25. Is a rewrite operation possible in an ESDS?

Yes, you can update (rewrite) existing records in an ESDS. However, the length of the record must remain the same; you cannot change the size of a record during a rewrite operation.

26. What's the device-independent method to indicate where a record is stored?

The Relative Byte Address (RBA) is a device-independent method used to indicate the storage location of a record within a dataset. It represents the offset, in bytes, from the beginning of the dataset to the start of the record.

27. What are the distinctive features of a KSDS (Key Sequenced Data Set)?

A KSDS has two main features:

  • Index: An internal structure that maintains the keys and pointers to the actual data records, enabling efficient key-based access.
  • Distributed Free Space: Allocated space within the dataset to accommodate new records, helping to reduce the need for dataset reorganization.

28. What is the Index Set?

The Index Set is the higher-level part of the KSDS index structure. It contains pointers to the Sequence Set and may have multiple levels, forming a hierarchical structure that facilitates efficient data retrieval.

29. What is Free Space in a KSDS?

Free Space in a Key Sequenced Data Set (KSDS) refers to the reserved space within the data component to accommodate the insertion of new records. This helps in reducing the frequency of control interval and control area splits, thereby maintaining performance.

30. Do primary key values have to be unique? Do alternate key values have to be unique?

Yes, primary key values in a KSDS must be unique to ensure each record can be uniquely identified. Alternate key values, however, do not have to be unique; multiple records can share the same alternate key value.