VSAM Realtime (Scenario based) Interview Questions (31 - 38)
31. What are the differences between Control Interval and Control Area?
Feature | Control Interval (CI) | Control Area (CA) |
---|---|---|
Definition | Smallest unit of storage in VSAM | A group of Control Intervals |
Size | Typically 512 bytes to 32 KB | Usually multiple CIs (e.g., 1 track or more) |
Contains | Records, free space, and control info | One or more complete Control Intervals |
Used In | Record-level access and updates | Allocation and space management |
Split Type | CI Split happens when CI is full | CA Split happens when all CIs are full |
Purpose | Manages how records are stored/retrieved | Manages how space is allocated on disk |
CI is the smallest data unit, holding actual records. CA is a larger unit, grouping multiple CIs for space allocation and management.
32. What are the differences between CI split and CA split?
Feature | CI Split (Control Interval Split) | CA Split (Control Area Split) |
---|---|---|
When It Occurs | When a CI is full during record insertion | When all CIs in a CA are full |
Action Taken | CI is split into two, records redistributed | A new CA is allocated, and CIs are moved |
Performance | Less expensive than CA split | More resource-intensive |
Impact | Affects a single CI | Affects the entire CA |
CI Split happens within a single CI. CA Split involves moving data across CAs when no space is left.
33. What’s the Difference between LDS & ESDS?
Feature | LDS (Linear Data Set) | ESDS (Entry-Sequenced Data Set) |
---|---|---|
Access Method | Byte-addressable, no record structure | Record-based, sequential or RBA access |
Used For | Databases (e.g., DB2 tablespaces) | Sequential storage of fixed/variable records |
Record Handling | No concept of records | Has logical records with RBAs |
Control Interval | Must be a multiple of 4K | Can vary, based on record size |
LDS is for byte-stream data (no records), ideal for databases, while ESDS stores records sequentially and supports RBA access.
34. What does '02' file status code indicate?
File Status Code '02' means: Duplicate key found during a READ or START operation on an Indexed (KSDS) file.
35. What are a few of the VSAM File status codes?
Listed below are the common file status codes:
- 00: The operation was successful.
- 04: Fixed length record was invalid.
- 20: The key for KSDS or RRDS is invalid.
- 22: Duplicate primary key found.
- 23: Error locating the record or file.
- 30: Permanent I/O fault.
- 38: Attempting to open a locked file.
- 91: Invalid password or authorization.
- 93: Resources are unavailable.
- 95: Invalid or incomplete file information.
- 98: File Locked- Failed to open the file.
- 99: Record Locked - Failed to access record, etc.
36. What does GDG mean in VSAM?
GDG stands for Generation Data Group. It is a collection of chronologically or functionally related datasets, known as generations, that are managed together. GDGs simplify dataset management by allowing easy reference to the latest or specific generations.
37. If a GDG exists in 3 generations, how would you reference the 1st generation in the JCL?
If a GDG has 3 generations, the 1st generation (oldest) can be referenced using: DSN=MY.GDG.BASE(-2)
38. How are the GDG versions named?
GDG (Generation Data Group) versions are named using a base name followed by a generation and version number.
BaseName.GnnnnVnn
- Gnnnn → Generation number (e.g., G0001)
- Vnn → Version number (e.g., V00)