A fixed RRDS (Relative Record Data Set) is a VSAM dataset type in which every record has the same length and records are stored in fixed-size slots. Each slot is identified by a relative record number (RRN): slot 1 is RRN 1, slot 2 is RRN 2, and so on. You define a fixed RRDS with IDCAMS using NUMBERED and RECORDSIZE with the same minimum and maximum (e.g. RECORDSIZE(80 80)). There is no index component—only a data component—so the RRN directly corresponds to a slot position. This page explains what a fixed RRDS is, how to define it with DEFINE CLUSTER, the effect of REUSE and NOREUSE, how space and slot count are determined, and when to choose fixed RRDS over variable RRDS (VRRDS) or other VSAM types.
A fixed RRDS is one of two RRDS variants. In a fixed RRDS every record has the same byte length. The data component is divided into slots of that size; each slot either is empty or contains one record. The slot number is the RRN. So RRN 1 is the first slot, RRN 2 is the second, and so on. You access records by RRN: set the RRN (e.g. in COBOL RELATIVE KEY) and READ, WRITE, REWRITE, or DELETE. Because record length is fixed, the system can compute the physical position of any slot from the RRN and the record length; no index is needed. That makes the structure simple and direct-addressing fast.
You create a fixed RRDS with the IDCAMS DEFINE CLUSTER command. You must specify NUMBERED to indicate RRDS, and RECORDSIZE with the same value for average and maximum (e.g. RECORDSIZE(80 80) for 80-byte records). You allocate space with CYLINDERS, TRACKS, or RECORDS. Optionally you specify REUSE so that deleted slots can be reused for new records. You define only a DATA component—no INDEX. The INDEX component is used by variable-length RRDS (VRRDS), not by fixed RRDS.
| Parameter | Description |
|---|---|
| NUMBERED | Specifies RRDS. Required for any RRDS (fixed or variable). |
| RECORDSIZE(n n) | For fixed RRDS, use the same value twice (e.g. 80 80). Every record is exactly n bytes. |
| REUSE | Deleted slots can be reused; a WRITE to that RRN places a new record in the slot. |
| NOREUSE | Deleted slots remain empty; default in some systems if REUSE is not specified. |
| CYLINDERS / TRACKS / RECORDS | Space allocation. Number of slots derived from space and record size. |
| DATA only | Fixed RRDS has no INDEX component; define only the DATA component. |
The following example defines a fixed RRDS with 80-byte records, 2 cylinders primary and 1 cylinder secondary allocation, and REUSE so that deleted slots can be reused.
12345678DEFINE CLUSTER ( - NAME(USERID.MY.FIXEDRRDS) - NUMBERED - RECORDSIZE(80 80) - CYLINDERS(2 1) - VOLUMES(volser) - REUSE) - DATA (NAME(USERID.MY.FIXEDRRDS.DATA))
NUMBERED makes it an RRDS. RECORDSIZE(80 80) makes every record 80 bytes and defines the slot size. CYLINDERS(2 1) allocates 2 cylinders primary and 1 secondary. REUSE allows a deleted slot to be reused for a new WRITE at the same RRN. The DATA component is the only component; there is no INDEX. The number of slots is determined by how many 80-byte slots (plus control information per control interval) fit in the allocated space.
For a fixed RRDS the average and maximum record size must be the same. So you always specify RECORDSIZE(n n)—for example RECORDSIZE(47 47) or RECORDSIZE(80 80). If you specify different values (e.g. RECORDSIZE(80 120)), you are defining a variable-length RRDS, which requires an INDEX component and different internal structure. The fixed RRDS uses the single value to size each slot: every slot holds exactly n bytes of record data (plus any control bytes that VSAM adds within the CI).
REUSE means that when you delete a record (DELETE at that RRN), the slot is marked available. A subsequent WRITE with the same RRN will place a new record in that slot. So you can delete and re-insert at the same RRN. NOREUSE (or omitting REUSE on systems where NOREUSE is the default) means that once a record is deleted, that slot remains empty and cannot be used again. The RRN is still valid for READ (you get "record not found") but WRITE to that RRN may not be allowed or may behave differently depending on the system. For many applications REUSE is desired so that space from deleted records can be reused.
The number of slots in a fixed RRDS is determined by the allocated space and the record (slot) size. You specify space with CYLINDERS(primary secondary), TRACKS(primary secondary), or RECORDS(number). If you use RECORDS(n), the system allocates enough space for n records of the given size. If you use CYLINDERS or TRACKS, the system computes how many slots fit in that space (accounting for control interval layout, RDFs, CIDF, etc.). So you do not always specify the slot count explicitly; it is derived from space and RECORDSIZE. If you need a specific number of slots (e.g. 10,000), you can use RECORDS(10000) if your IDCAMS supports it, or compute the required cylinders or tracks from the record size and device characteristics.
In a variable-length RRDS (VRRDS) records can have different lengths. You specify RECORDSIZE(min max) with min less than max (e.g. RECORDSIZE(50 200)). VRRDS requires an INDEX component that maps each RRN to the physical location of the record. So VRRDS has both DATA and INDEX; fixed RRDS has only DATA. In fixed RRDS the RRN is the slot index and the slot position is computed. In VRRDS the RRN is a logical record number and the index maintains the mapping. Use fixed RRDS when all records are the same length and you want the simplest structure; use VRRDS when record lengths vary.
| Aspect | Fixed RRDS | Variable RRDS (VRRDS) |
|---|---|---|
| Record length | All records same length | Records can vary (min and max in RECORDSIZE) |
| Index | No index component | INDEX component required |
| Slot | One fixed slot per RRN | RRN mapped to record via index |
| Space | Pre-allocated slots; empty slots use space | Space used by actual records |
A fixed RRDS does not have an index component. The data component is a sequence of control intervals, each containing a number of fixed-size slots. The RRN maps directly to "slot N" and the offset of that slot can be calculated from the record length and the control interval structure. So direct access by RRN does not require an index search—it is a computation. That keeps definition and access simple and avoids index maintenance overhead. Variable-length RRDS, in contrast, needs an index to find where each RRN's record is stored.
Use a fixed RRDS when: (1) every record is the same length, (2) you want to access records by position (RRN) rather than by key, and (3) you want the simplest RRDS structure without an index. Typical uses include lookup tables keyed by row number, caches where a numeric id maps to a slot, and files where the application assigns and tracks RRNs. If you need variable-length records, use VRRDS. If you need key-based access (e.g. find by customer ID), use KSDS instead. If you need append-only with stable byte addresses, use ESDS.
You can READ by RRN (direct), WRITE at an RRN (insert into that slot if empty or when replacing per your rules), REWRITE after READ (update in place; record length must stay the same), and DELETE at an RRN (free the slot; with REUSE it can be reused). Sequential access reads records in RRN order (1, 2, 3, …). Dynamic access allows you to position at an RRN with direct READ and then read sequentially from there.
Imagine a parking lot where every space is the same size. Each space has a number: 1, 2, 3, 4, 5. That's a fixed RRDS: same-size "records" (parking spaces), and each space has a number (RRN). To park a car (WRITE), you pick a space number. To get a car (READ), you go to that space number. If you drive away (DELETE), the space is empty. If the rule is REUSE, someone else can park in that same space number later. The lot has no "index"—you just know space 5 is the fifth space.
1. Which parameter identifies a cluster as an RRDS?
2. For a fixed RRDS, what must RECORDSIZE look like?
3. Does a fixed RRDS have an INDEX component?