z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Variable-Length Relative-Record Data Sets

z/OS DFSMS Using Data Sets
SC23-6855-00

A variable-length RRDS (VRRDS) is similar to a fixed-length RRDS, except that it contains variable-length records. Each record has a unique relative record number, and is placed in ascending relative record number order. Each record is stored and retrieved using its relative record number. Unlike a fixed-length RRDS, a variable-length RRDS does not have slots. The relative record number of a record cannot change. When that record is erased, the relative record number can be reused for a new record.

You must load the variable-length RRDS sequentially in ascending relative record number order. To define a variable-length RRDS, specify NUMBERED and RECORDSIZE. The average record length and maximum record length in RECORDSIZE must be different.

Free space is used for inserting and lengthening variable-length RRDS records. When a record is deleted or shortened, the space given up is reclaimed as free space for later use. When you define your data set, use the FREESPACE parameter to specify what percentage of each control interval and control area is to be set aside as free space when the data set is initially loaded. Insertion of a Logical Record in a CI shows how free space is used to insert and delete a logical record.

A variable-length RRDS cannot have spanned records and alternate indexes. VRRDS is a KSDS processed as an RRDS so a prime index is created.

Variable-length RRDS performance is similar to a key-sequenced data set, and is slower than for a fixed-length RRDS. Table 1 shows the operations available for key-sequenced data sets and direct or skip-sequential access.

Table 1. Variable-length RRDS processing
Operation Sequential Access Direct or Skip- Sequential Access
Loading the data set Yes, in ascending relative record number order No
Adding records Yes Yes (free space is used)
Retrieving records Yes Yes (by relative record number)
Updating records Yes Yes
Deleting records Yes (free space is reclaimed) Yes (free space is reclaimed)

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014