REBUILD INDEX utility

The REBUILD INDEX utility reconstructs indexes or index partitions from the table that they reference.

About this task

When you select the REBUILD INDEX utility, the Online Rebuild Index options panel is displayed, as shown in the following figure:

Figure 1. Online Rebuild Index options panel
 AUTOXPRT      ------- Online Rebuild Index Options ------- 2023/10/20 11:30:54 
 Option   ===>                                                                  
                                                                                
 Creator: TWUSR      Name: DAJ-12916                        User: TWUSR         
                                                   Db2 Subsystem: SS01          
                                                                    More:     + 
                                                                                
  Exception Rule     A (A - Accepted, R - Rejected, B - Both)                   
  Utility ID . . . .                  (16 characters)                           
  Sharelevel . . . . R        (R - Reference, C - Change)                       
  Drain Wait . . . .          (0-1800 seconds)                                  
  Retry  . . . . . .          (blank, 0-255)                                    
  Retry Delay  . . .          (1-1800 seconds)                                  
  Maxro  . . . . . .          (blank, Number, DEFER)                            
  Longlog  . . . . . C        (C - Continue, T - Term, D - Drain)               
  Delay  . . . . . . 1200     (Number)                                          
  RBALRSN_CONVERSION          (blank, N - None, B - Basic, E - Extended)        
  Statistics                                                                    
    Reuse existing data sets  . . . N  (Yes/No)                                 
    Gather index statistics . . . . N  (Yes/No)                                 
      Report messages . . . . . . . N  (Yes/No)                                 
      Update catalog tables . . . . A  (A - All, P - Path, S - Space, N - None) 
      Update history tables . . . . A  (A - All, P - Path, S - Space, N - None) 
      Collect all distinct values   N  (Yes/No)                                 
      Update statistics . . . . . . N  (Yes/No)                                 
                                                                                
  Optional Template Dataset and member name:                                    
    Template Dataset                                                            
    Member name  . .                                                            
                                                                                
  FlashCopy Options    (blank, Y -Yes, N - No, C - Consistent)                  
    Update FlashCopy Dataset Options N (Yes/No)                                 
                                                                                
  Optional Skeletals            -BEFORE-     -AFTER-                            
    JCL Skeletal  . . . . . . .          . .          (8 Character Name)        
    Control Cards Skeletal  . .          . .          (8 Character Name)        
    Step End Skeletal . . . . .          . .          (8 Character Name)        
                                                                                

Refer to the help panel for a detailed description of the fields on this panel.

Procedure

  1. Set the Exception Rule field.
  2. Set other fields on the panel as desired.
  3. If you want index statistics to be collected during the REBUILD INDEX, configure the type of statistics to be collected as follows:
    1. Enter Y in the Gather Index Statistics field.
    2. Enter Y in the Update statistics field and press Enter.
    3. On the Rebuild Utility Column Statistics panel, follow the instructions in the topic Setting FREQVAL and HISTOGRAM options to complete configuring the statistics.
  4. If you want to specify a FlashCopy® image copy during the REBUILD INDEX, follow these steps:
    1. Select the copy type in the FlashCopy Options field and enter Y in the Update FlashCopy Dataset Options field.
    2. The FlashCopy Options panel is displayed. Set FlashCopy options as described in Updating data set options.
  5. If you want to specify a FlashCopy image copy during the REBUILD INDEX but use your own template data set, follow these steps:
    1. Specify the template data set and member name in the Optional Template Dataset and member name fields.
    2. Select the copy type in the FlashCopy Options field and enter Y in the Update FlashCopy Dataset Options field.
    3. When the TEMPLATEDD Name Selection panel is displayed, select a template name and press PF3 to return to this panel.