VSAMintermediate
VSAM RRDS: Relative Record Data Sets
Understand RRDS as a VSAM organization providing fast direct access by slot number rather than by content-based key.
An RRDS is a numbered set of slots. Records are addressed by slot number: 1, 2, 3.
An RRDS is a wall of numbered parking spaces — pulling into space 47 is instant and requires no lookup at all, but the parking garage has no idea whose car is in space 47 unless someone elsewhere keeps a separate list matching license plates to space numbers.
Key Concepts
1
It is the least used of the three organisations, which is why it gets asked about — it shows whether
someone's VSAM knowledge extends past KSDS.
2
There is no index at all. The slot number is the location. VSAM computes where slot 4,281 sits
arithmetically and goes there.
3
KSDS key -> traverse the index -> record
RRDS slot number -> compute the offset -> record4
So for pure direct access it is faster than a KSDS, because there is no tree to walk.
5
The catch is that the slot number means nothing. It is a position, not a business key. If you want
customer C0004521, something must know that they live in slot 4,521 — and that mapping is the
application's problem.
C0004521
6
Which is why it suits data that is naturally numbered.
366 slots one per day of the year
50 slots one per state or region
1000 slots a bounded configuration or rate table7
Here the slot number is the natural identifier. Day 183 is slot 183, with no lookup needed.
8
Slots can be empty. A slot never written simply has nothing in it, so a sparse RRDS is fine — 1,000
slots with 40 used costs the space and nothing else.
9
Two variants. Fixed-length RRDS gives every slot the same size, which is what makes the arithmetic
possible. Variable-length (VRRDS) relaxes that, at the cost of the simple model that made RRDS attractive.
10
The honest positioning. Most business data needs lookup by something meaningful — an account number, a
customer id — and that is what KSDS provides.
11
RRDS earns its place where the position genuinely is the identifier, or in a high-performance lookup where
the program can compute the slot without any index. Outside those, KSDS is the answer, and saying so is
better than presenting RRDS as an equal alternative.
12
What the interviewer is probing.1. "How is a record located in an RRDS?" Probing: the model. Stalls: "By key." Moves up:
by its relative record number, so access is direct arithmetic with no index to traverse.
13
2. "What is the constraint?" Probing: the limitation. Stalls: "None." Moves up: records
are fixed length and slots exist whether used or not, so a sparse number range wastes space.
14
3. "When would you actually choose one?" Probing: judgement. Stalls: "Often." Moves up:
rarely now — when a dense numeric key maps naturally to a slot, such as a fixed table of codes.
15
4. "How does it compare with a KSDS for speed?" Probing: the trade. Stalls: "Slower." *Moves
up:* direct access is faster because there is no index read, but you lose keyed and
sequential-by-key access.