Reusing deleted records

 

Sometimes you might want to reuse deleted records for your database files. In this case, you can use the REUSEDLT parameter. When you specify REUSEDLT(*YES) on the Create Physical File (CRTPF) or Change Physical File (CHGPF) command, the following operations might work differently:

Because of the way the system reuses deleted record space, the following types of files should not be created or changed to reuse deleted record space:

If you decide to change an existing physical file to reuse deleted record space, and there are logical files with access paths with first-in-first-out (FIFO) or last-in-first-out (LIFO) duplicate key ordering over the physical file, you can re-create the logical files without the FIFO or LIFO attribute and avoid rebuilding the existing access path by following these steps:

  1. Rename the existing logical file that has the FIFO or LIFO attribute.

  2. Create a second logical file identical to the renamed file except that duplicate key ordering should not be specified for the file. Give the new file the original file name. The new file shares the access path of the renamed file.

  3. Delete the renamed file.

 

Parent topic:

File processing options