Q
Problem solve Get help with specific problems with your technologies, process and projects.

Reorganizing files with deleted records

We currently have a file that has 60 million records in it. We are in the process of deleting approximately half of them. Once complete we will need to reorganize the file. Any recommendations on the best way to reorganize a file with 30 million deleted records -- and the file is used every day? We have a 9406 S30 with dual processors and 1 gig of memory. Are there any resources that could be used to estimate how long the reorganization would even take?


There is some information documented within the OS/400 DB2 for recovering and restoring section on rebuilding access paths (R450 manual). However, I do not think there is an exact formula to calculate the time. There are a lot of variables.

Some suggestions for rgzpfm large files/dasd concerns....

1. Save the LF's to a save file
delete the lf's
run the RGZPFM to compress out the deleted rcds
restore the lf's from the savefile

2. Save the LF's to a save file
delete the lf's
run a CPYF to compress out the deleted rcds
delete the original file and move the new file (same name)
back to the original library
restore the lf's from the savefile

3. For DASDS concerns
CPYTOTAP followed by CPYFRMTAP with *REPLACE to remove the deleted records.

In all cases, if you see a high number of deleted records you may want to change the file to reuse deleted records.

Good luck!


Dig Deeper on Performance

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close