Sample MODIFY STATISTICS control statements

Use the sample control statements as models for developing your own MODIFY STATISTICS control statements.

Example 1: Deleting SYSIBM.SYSTABLES_HIST records by age

The following control statement specifies that the MODIFY STATISTICS utility is delete all statistics history records that are older than 60 days for table space DSN8D81A.DSN8S81E .

//STEP1    EXEC DSNUPROC,UID='IUIQU2UD.MODSTAT1',
//            UTPROC='',SYSTEM='DSN'
//SYSIN    DD *
  MODIFY STATISTICS TABLESPACE DSN8D12A.DSN8S12E
    DELETE ALL
    AGE 60
/*

Example 2: Deleting access path records for all objects in a list

The following MODIFY STATISTICS control statement specifies that the utility is to delete access-path statistics history rows that were created before 17 April 2000 for objects in the specified list. The list, M1, is defined in the preceding LISTDEF control statement and includes table spaces DB0E1501.TL0E1501 and DSN8D81A.DSN8S81E.

//STEP9    EXEC DSNUPROC,UID='JUOEU115.MDFYL9',       
//         UTPROC='',                                 
//         SYSTEM='SSTR'                              
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *                                       
                                                      
   LISTDEF M1 INCLUDE TABLESPACE DBOE1501.TLOE1501
              INCLUDE TABLESPACE DSN8D81A.DSN8S81E
   MODIFY STATISTICS LIST M1                          
                     DELETE ACCESSPATH DATE(20000417) 
/*  

Example 3: Deleting space-tuning statistics records for an index by age

The following control statement specifies that MODIFY STATISTICS is to delete space-tuning statistics records that are older than one day for index ADMF001.IXOE15S1 .

//STEP9    EXEC DSNUPROC,UID='JUOEU115.MOFYS9',     
//         UTPROC='',                               
//         SYSTEM='SSTR'                            
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *                                     
                                                    
   MODIFY STATISTICS INDEX ADMF001.IXOE15S1         
                     DELETE SPACE AGE 1             
/*    

Example 4: Deleting all statistics history records for an index space

The following control statement specifies that MODIFY STATISTICS is to delete all statistics history records for index space DBOE1501.IUOE1501. Note that the deleted records are not limited by date because (*) is specified.

//STEP8    EXEC DSNUPROC,UID='JUOEU115.MDFYL8',    
//         UTPROC='',                              
//         SYSTEM='SSTR'                           
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *                                    
   MODIFY STATISTICS INDEXSPACE DBOE1501.IUOE1501  
                     DELETE ALL DATE (*)           
/*