Is it possible to reorganize a file when the file is locked?
No. The RGZPFM process requires exclusive access to the file. The online help associated with the RGZPFM command lists these restrictions:
During the reorganization of a physical member, the file being reorganized is locked (similar to an *EXCL lock with no time-out) for the time of the RGZPFM command so that no access is possible. Concurrent attempts by another job to use a function that refers to the file may result in a "lock up" for that work station until the running of the RGZPFM command is completed. Examples of commands that cannot be used on a file that is concurrently being reorganized are: * WRKACTJOB (Work with Active Jobs) (Select 11-Locks; Select 1-WRKOBJLCK) * DSPDBR (Display Database Relations) * DSPFD (Display File Description) * DSPFFD (Display File Field Description) * DSPJOB (Display Job) (Option 12-Display Locks; Option 14-Display Open files; F10-Job record locks) * WRKJOB (Work with Job) (Option 12-Display Locks; Option 14-Display Open files; F10-Job record locks) * WRKLIB (Work with Library) (The library that contains the file being reorganized) * DSPOBJD (Display Object Description) * WRKOBJLCK (Work with Object Locks) * DSPRCDLCK (Display Record Locks) * WRKOBJ (Work with Object Descriptions) * DSPLIB (Display Library) (The library that contains the file being reorganized) * WRKF (Work with Files) * Any other function that refers to the file being reorganized
That said, there are products that can be used to reorganize a file while active.These products create a duplicate copy of the file and it's indexes, runs the RGZPFM command against this copy and then deletes the original and replaces it with the copy. The only time no one can be using the file is during the few moments it takes to delete and replace.
MORE INFORMATION ON THIS TOPIC
Ask the Experts yourself: Our backup & recovery gurus are waiting to answer your questions.
Search400.com's targeted search engine: Get relevant information on backup & recovery.
Check out this Search400.com Featured Topic on backup & recovery.
Related Q&A from Ken Graap
The BRMS Network feature allows a BRMS system to connect to other BRMS systems via a network, and enables a user to consolidate media such as backup ...continue reading
The only option to correct damage preventing file journaling is to use the RCLSTG command.continue reading
Find out if log files can be omitted during a save without causing problems in a full restore.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.