Avatar of Michael
Flag for United States of America asked on

Is there a RGZPFM option that will not update the previous or existing Relative Records Numbers (RRNs)?

Secondary replication tool is using Relative Record Numbers (RRN)s for table that do not have a PRIMARY (UNIQUE  ) index.  So, is there a RGZPFM option that will not update the previous or existing Relative Records Numbers (RRNs)?

IBM System iDB2* IBMi* IBM i* AS400

Avatar of undefined
Last Comment
Gary Patterson, CISSP

8/22/2022 - Mon
Gary Patterson, CISSP

RGZPFM's main job is to physically reorganize the data in the file - by removing deleted rows, and optionally physically sorting the rows.  So, no there is no way to preserve RRN - and that is by design.  RRN's are not stored in the file, they are imputed by the position of the row in the file.  So if you remove a deleted row, it will change the RRN of every row that follows.

Here is a simplified view of what RGZPFM does:

RRN   Data
1         ABCDEF
2        (Deleted record)
3        XYZ123
4        (Deleted record)


RRN   Data
1         ABCDEF
2        XYZ123

Typically to reorg a file under replication, you stop replication, reorg the file, then start replication back up for the file.  Generally this results in a full copy of the reorganized file being sent.  Specific process varies depending on the replication software, and is usually documented pretty clearly, or instructions for reorganizing a non-keyed file can be obtained from your replication vendor's tech support team.  

What replication software are you using?


Thanks, that was my conclusion also, but I did not consider that the RRN was not stored in the Table.  Relative means relative to the data currently in table,deleted or active rows.  Replication application is Attunity.  We have tables without a Primary (Unique) index, so Attunity uses RRN.
Gary Patterson, CISSP

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy