20 pts.
 must reorganize huge file over thanksgiving
We have a file with 4 million active records and 200 million deleted records , I want to reorganize on Thanksgiving. Plan is to copy out (cpyf) , clrpfm, then copy back (cpyf). My question is will the 'clrpfm' run for hours ??

Software/Hardware used:
ASKED: November 11, 2008  8:22 PM
UPDATED: November 13, 2008  2:18 AM

Answer Wiki:
If you have logicals over this file, you may want to change the “Access path maintenance” to “*dly”. This will allow the “RGZPFM” to run faster because the access path will not be update during the reorg. After it finishes, submit the change to the logicals “Access path maintenance” to “*immed” (or what they were before). Hopefully noone or not job will open the logicals until they finish or they will be waiting a while. If you submit all of the jobs to batch with a jobq that runs one at a time you will not have to watch them run. (If you have a job that will email/page you, you could submit it last and then you will know when it is done.) MDratwa's response get's promoted. the 'no' answer was lame and not helpful. I say RGZPFM. You need to make sure the file is flagged to reuse deleted records otherwise it's isn't going to help much. Try scheduling this reorg to run every few weeks and it will run faster
Last Wiki Answer Submitted:  November 13, 2008  2:17 am  by  bvining   6,055 pts.
All Answer Wiki Contributors:  bvining   6,055 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Why don’t you use RGZPFM?

Rudolf

 810 pts.

 

Hi,

Bvining is correct – the CLRPFM will be very quick. The CPYF’s will take longest to run. I suggest you do a CHGPF of your file to re-use deleted records :-

CHGPF yourlib/yourfile REUSEDLT(*YES)

This will avoid deleted records in the future – check that your application programs don’t get affected by doing this beforehand (maybe your application needs records in arrival sequence).

Regards,

Martin Gilbert.

 23,625 pts.

 

When you RGZPFM or cpyf into your file DBMS will rebuild all the logicals — that may take the longest.

 44,630 pts.

 

If you have logicals over this file, you may want to change the “Access path maintenance” to “*dly”. This will allow the “RGZPFM” to run faster because the access path will not be update during the reorg. After it finishes, submit the change to the logicals “Access path maintenance” to “*immed” (or what they were before). Hopefully noone or not job will open the logicals until they finish or they will be waiting a while. If you submit all of the jobs to batch with a jobq that runs one at a time you will not have to watch them run. (If you have a job that will email/page you, you could submit it last and then you will know when it is done.)

 675 pts.