RGZPFM command

pts.
Tags:
DataCenter
Guys, do you have some experiences in using this command. What will be its major impact to the AS400 files? Do you have some bad experience (hope none)? what will i need to do first before i execute this command? Thank you.

Answer Wiki

Thanks. We'll let you know when a new response is added.

You need to ensure that there are no locks on the object that is being reorganised – WRKOBJLCK. Use SBMJOB to run the command, do not run it from a command line .
The impact on the system is dependant upon the models of processor and disks, the size of the file and the number of attached logical files. The recent models seem to cope with the activity much better, and a large file can be reorganised in minutes, whereas on an older system, the same file could take hours.

Discuss This Question: 9  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Juliettree
    You also should be aware of the QDBSRV** jobs that often run after a reorganisation of a file to index the file. They can have a detrimental effect on performance though this is usually short periods. Best advice is to try do out if hours if possible.
    0 pointsBadges:
    report
  • DownSouth
    We use the job scheduler to reorganize are most active files (Adds and Deletes)in off hours. The reorg of physical files will simply remove deleted records and index the file the way that you request it to in the command. The file and all of it's logicals cannot be in use. The time required is based on: Your configuration. The file size. The number of logicals attached to the file being reorganize. Hope this helps
    0 pointsBadges:
    report
  • Silvrsystm
    Best to run this command when the system is not in public use--like overnight or on the weekend. If you have never run this, you should see a reduction in disk space usage as the deleted records are compressed out of the file. I wrote a "looping" program years ago that outfiles all physical files in a library and reorganizes them. Then outfile will tell you if the physical file has a key or not. If it has a key, and that key is the most frequently used key, then reorganize the physical file against its key. Depending on the size of your files and the size of your system, reorganizing can take several hours. Best to "test" your process against a smaller library or duplicate a production library into a test library and reorganize the test library for a benchmark. Hope this is helpful.
    0 pointsBadges:
    report
  • Kayetl
    I run a job on the weekend that does my RGZPFM. This keeps my system clean and does not have an impact on daily operations. 1.I do a dspobjd to an outfile to get all of the physical files in a library. 2.Then I do another Cl that uses the name of the physical files from step 1 and do a dspfd *mbrlist of the physical files to an outfile. 3.I take the outfile from step 2 and write another cl that depends on the number of deleted records and then do my RGZPFM.
    0 pointsBadges:
    report
  • Bkr0963c
    I ran a similar command supplied by the software vendor to reorganize their db files specifically for their application. If you are in the same situation, check to see if the vendor has a specific command they want you to run instead of the AS400 supplied RGZPFM. However, both commands basically do the same thing (in regards of deleting out records), with the exception that the vendor supplied command looked like it rebuilt access paths of logicals over the physicals. This was to help performance I suppose. Also, it took 7 hours to do one production library, so it is best to schedule this during off hours and definately make sure no locks are on the files.
    0 pointsBadges:
    report
  • DonKennedy
    We use the TAATOOL RGZLIB with the DLTPCT and DLTSPACE parameters as part of our weekly IPL (to insure no locks). This way only files that will really benefit from the reorg are reorged.
    0 pointsBadges:
    report
  • Snapper70
    Once you get comfortable with it, you can get creative with how to do it. I had written something similar to what others have done here, where member lists of files are dumped to an outfile, sorted by number of DELETED records; then reorg'd in order of space saved. Oh, and to avoid crunching the users come morning, I had a "fudge factor" that I could estimate the number of records/hr, and skip files that wouldn't likely have time to finish by 5:00 am (that fudge factor was a trial-and-error number based on the machine).
    920 pointsBadges:
    report
  • Keyura
    I suggest you considered dependents too. If you have too many logical files, it will take long time using RGZPFM command. You can achieve same result by deleting Logical Files, and copying the file at other location (provided if you have enough space) and copy it back after clearing it. After copy, create logical files based on key fields used. I know these are multiple steps but it cuts down considerable processing time and also you can control the process.
    0 pointsBadges:
    report
  • Mannyd
    Thank you guys. your suggestion is very welcome and i will be doing a plan to reorganize all our production files. again, thank you very much.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following