Q

Reorganizing locked files

Reorganizing locked files

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:

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.


This was first published in July 2003
This Content Component encountered an error

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.

0 comments

Oldest 

Forgot Password?

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

Your password has been sent to:

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close