VSAM Here’s All About RBA – And RRN

Relative Byte Address

The RBA of a logical record is the offset of its first byte from the beginning of the data set.

The first logical record in a VSAM data set has an RBA of zero. The second logical record has an RBA equal to the length of the first record, and so on.

VSAM returns to the application the RBA of the stored logical record.

The RBA of a logical record in VSAM includes the free space and control information that is stored sequentially before this logical record.

RBA might change when records are added, deleted, or changed in size.

With compressed data sets, the RBA for compressed records are not predictable. Therefore, access by RBA is not suggested for normal use.

There are two important RBA values, which are kept in the VSAM catalog:

  • High used RBA (HURBA) is the RBA of the first available byte for inclusion at end of the used part of a VSAM data set. HURBA is not rounded to the CA size.
  • High allocated RBA (HARBA) is the RBA of the last byte in the allocated part of a VSAM data set. HARBA is rounded to the CA size.
The Control Area (CA) free spaces is greater than 25%. This is the time for re-organization.

In the above figure, a dataset of VSAM occupies 4 CAs and each CA is having 4CIs and each CI size is 4K. The above calculation tells how to calculate HURBA and HARBA values. These values you can see in ICF (integrated catalog facility).

Relative Record Number

RRN is the relative number of a logical record in a VSAM-specific organization (RRDS). If a logical record has an RRN of 3, it is the fourth logical record in the data set.

Gift Leather Wallet

Related Posts

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.