Each RECORD in a data file is associated with a unique INDEX NUMBER. A RECORD consists of two parts, the data component and a separate index file known as RRN (Relative Record Number) which allows the system to physically locate the record in the data file by its INDEX NUMBER. Together, the data and index components are called a data cluster.
In conclusion Swpa, RRN, definitely IS PART of the RECORD. Because, the RECORD without its INDEX NUMBER identifying its position (RRN) would be lost in oblivion and impossible to be located and retrieved.
Please describe your issues.
The RRN for a record may change when the file is reorganized.
If your question is about subfile, the variable you are using for RRN is part of the buffer used by the compiler to send/receive data, it’s part of the record.
If your question is about a physical file, it’s not part of the record. It’s just the relative position of the record in the file and isn’t part of buffer.