Previous Topic: Storing Variable-Length RecordsNext Topic: Record Deletion


Relocated Records

Records Relocated Because of Increased Size

When increasing record sizes in areas, the RESTRUCTURE utility statement may occasionally relocate a record if the record no longer fits on its home page. Similarly, if a table has been altered to add one or more columns, CA IDMS/DB may relocate a row when it is next updated because it will no longer fit on its original page. The dictionary migration utility (RHDCMIG1 and RHDCMIG2) may also relocate records. When a record is stored on a new page, the relocated record is considered an SR3 system record and the line index created for the record on the new page contains a record id of 3.

Record Identified by SR2 System Record

To preserve the integrity of the record's database key, CA IDMS/DB leaves an 8-byte control record (an SR2 system record) on the home page in place of the relocated record. The SR2 system record has a record id of 2 and contains the following information about the relocated record:

Returning Relocated Record to its Home Page

On future accesses (GET, OBTAIN, or SELECT) of a relocated record, CA IDMS/DB may return the relocated record to its home page. If the area is readied in update mode and the home page has sufficient space to hold the relocated record, CA IDMS/DB returns it to the page.

In the following example, the OFFICE 1 record, increased in size by RESTRUCTURE, is moved from page 7120 to 7121.