---
title: "VSAM Here’s All About RBA – And RRN"
description: "Here's a difference between VSAM HURBA and HARBA and its calculation. It's useful for interviews."
url: https://srinimf.com/2021/09/28/vsam-heres-all-about-rba-and-rrn/
date: 2021-09-28
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2021/09/pexels-photo-793012.jpeg?fit=1880%2C1167&ssl=1
categories: ["VSAM"]
tags: ["VSAM RBA and RRN"]
type: post
lang: en
---

# 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.

Related[8 Complex VSAM Interview Questions](https://srinimf.com/2015/01/30/vsam-tough-interview-questions/)

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.**

![](https://i0.wp.com/srinimf.com/wp-content/uploads/2021/09/rba.jpg?resize=701%2C408&ssl=1)*The Control Area (CA) free spaces is greater than 25%. This is the time for re-organization.*

Related[Top Reasons Why ESDS VSAM File Allows Duplicate Values](https://srinimf.com/2015/11/09/vsam-how-esds-allows-duplicate-record/)

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](https://srinimf.com/2017/08/07/pli-these-are-the-best-ways-for-vsam-files/) 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](https://www.amazon.in/HORNBULL-Brown-Leather-Wallet-Combo/dp/B097NPQSHW?tag=srinimf-21)**

Related Posts

- [8 Complex VSAM Interview Questions](https://srinimf.com/2015/01/30/vsam-tough-interview-questions/)DateJanuary 30, 2015
- [VSAM: KSDS, ESDS, LDS, RRDS Differences and Their Uses](https://srinimf.com/2012/05/16/vsam-ksds-esds-lds-rrds-and-their-uses/)DateMay 16, 2012
- [How to Handle VSAM files in PL1 language](https://srinimf.com/2017/08/07/pli-these-are-the-best-ways-for-vsam-files/)DateAugust 7, 2017

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2021%2F09%2F28%2Fvsam-heres-all-about-rba-and-rrn%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2021%2F09%2Fpexels-photo-793012.jpeg%3Ffit%3D1200%252C745%26ssl%3D1&description=VSAM%20Here%27s%20All%20About%20RBA%20-%20And%20RRN)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2021/09/28/vsam-heres-all-about-rba-and-rrn/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2021/09/28/vsam-heres-all-about-rba-and-rrn/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2021/09/28/vsam-heres-all-about-rba-and-rrn/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2021/09/28/vsam-heres-all-about-rba-and-rrn/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20VSAM%20Here%27s%20All%20About%20RBA%20-%20And%20RRN&body=https%3A%2F%2Fsrinimf.com%2F2021%2F09%2F28%2Fvsam-heres-all-about-rba-and-rrn%2F&share=email)
-

### Like this:

Like Loading…
