VSAM Realtime (Scenario based) Interview Questions (31 - 38)

31. What are the differences between Control Interval and Control Area?

FeatureControl Interval (CI)Control Area (CA)
DefinitionSmallest unit of storage in VSAMA group of Control Intervals
SizeTypically 512 bytes to 32 KBUsually multiple CIs (e.g., 1 track or more)
ContainsRecords, free space, and control infoOne or more complete Control Intervals
Used InRecord-level access and updatesAllocation and space management
Split TypeCI Split happens when CI is fullCA Split happens when all CIs are full
PurposeManages how records are stored/retrievedManages 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?

FeatureCI Split (Control Interval Split)CA Split (Control Area Split)
When It OccursWhen a CI is full during record insertionWhen all CIs in a CA are full
Action TakenCI is split into two, records redistributedA new CA is allocated, and CIs are moved
PerformanceLess expensive than CA splitMore resource-intensive
ImpactAffects a single CIAffects 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?

FeatureLDS (Linear Data Set)ESDS (Entry-Sequenced Data Set)
Access MethodByte-addressable, no record structureRecord-based, sequential or RBA access
Used ForDatabases (e.g., DB2 tablespaces)Sequential storage of fixed/variable records
Record HandlingNo concept of recordsHas logical records with RBAs
Control IntervalMust be a multiple of 4KCan 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)