Functional Overview

The ADADRU utility currently includes a single utility function, ADADRU SPACEUSAGE, that you can use to produce summarized and detailed reports about database file space usage.

ADADRU verifies that the files specified in the utility run are not in an inconsistent state after being processed simultaneously by utilities such as ADALOD UPDATE or ADAORD, that heavily update or reorganize the database. Updates to the file are permitted while the ADADRU utility is processing. The utility reads through the Associator (ASSO) and Data Storage (DATA) containers for each file requested, and gathers information about file extents, and RABN usage statistics like RABN used space, and RABN free space.

ADADRU can report on an individual file in a database, specifically selected files in the database, or all the files in a database. The individual file processing can also be limited to ASSO information, DATA information or a combination of ASSO and DATA RABNs.

Reports are generated for every file requested in the ADADRU run. If a file resides on more than one device type, file reports are produced for every device type.

If you request detail reports (if parameter PFILESPACE, PASSOSPACE, or PDATASPACE is set to "DETAIL"), the "File ASSO/DATA Detail Report" is produced, as appropriate. The report can be directed to a specific file using the DD statement with the name DDDETAIL. (For more information, read JCL Requirements and Examples . Detail reports may be very large because information may be printed for every RABN in a file (or a specific RABN range).


Spanned Record Handling

During its sequential read of RABNs, if ADADRU detects the primary segment of a spanned record in the Data Storage area, it will use the secondary address converter (AC2) to find and read all secondary segments of the spanned record to determine the full record length and number of its segments. The search for the secondary segments starts by searching and reading the corresponding AC2 block, determining the Data Storage RABN containing this secondary segment, reading the Data Storage RABN, and finally searching for the secondary spanned record identified by the RABN. When all segments of the spanned record are found, ADADRU will start its processing with the RABN of the primary segment.

ADADRU does not have any special parameters for spanned record handling.

Spanned records are reported in the ADADRU output in the following ways.

  1. The FCB file options section of the report describes whether the file supports the use of spanned records. The "Spanned Records Support" statistic in this section of the ADADRU report provides this information ("Yes" means spanned records are supported by the file; "No" indicates they are not supported).

    File options (from FCB):                                                   
    ------------------------                                                   
    Date / Time Loaded ..................... 2010-04-28 10:01:49.79            
    Date / Time of last update ............. 2010-05-04 07:07:08.47            
    Date / Time of last physical restructure 2010-04-28 10:01:49.79            
                                                                               
    ISN Reusage ............................ No                                
    DATA Storage Reusage ................... Yes                               
    MIXDSDEV ............................... No                                
    Spanned Records Support ................ Yes            
    Index compressed ....................... No                          
    2-Byte MU/PE Index ..................... No                                
    Highest Index Level .................... 3                                 
                                                                               
    LOB fields ............................. No                                
    LOB file ............................... No                                
    Expanded ............................... No                                
    
  2. A section providing spanned record statistics is included in the "Data Storage Summary" section of the report only if the file supports spanned records. Here is a sample of this section:

    Spanned Record:                                                            
       Average record length .................................  15072          
       Minimum record length .................................  15068          
       Maximum record length .................................  15076          
       Number of records with minimum length .................  100            
       Number of records with maximum length .................  100            
       Average numbers of segments ...........................  3              
       Minimum numbers of segments ...........................  3              
       Maximum numbers of segments ...........................  3              
       Number of Primary Spanned Records .....................  499            
       Number of Secondary Spanned Records....................  998            
       Number of AC2 blocks read .............................  2              
       Data Storage blocks with secondary segments read ......  998
  3. A section describing the spanned record length and increment is included in the "Distribution Reports Data Storage" section of the report only if the file supports spanned records. If the file supports spanned records but does not contain any spanned records, ADADRU prints warning message DRU163W instead and sets the return code to "4" (ADARSP004). Here is a sample of this section:

    Spanned records length; Increment = Auto                                  
    --------------------------------------------------                        
    I        Length       I         Number           I                        
    I      of record      I       of records         I                        
    I---------------------I--------------------------I                        
    I   15055 -  15080    I              499         I                        
    --------------------------------------------------   
    
  4. In the "Data Storage Detail" section of the report the column header "Spanned" is always printed, regardless of whether or not the file supports spanned records. The "Spanned" column is split into two columns called "Num" and "Flg". The "Num" column provides the number of spanned record segments in each Data Storage RABN. The "Flg" columns values can be "P", "S", "L", or a blank, identifying the segment of the spanned record stored at the RABN:

    • "P" indicates that the current RABN contains the primary segment of the spanned record.

    • "S" indicates that the current RABN contains a secondary segment of the spanned record.

    • "L" indicates that the current RABN contains the last segment of the spanned record.

    • A blank indicates that the current RABN does not contain any segment of a spanned record.

    Here is a sample of this section of the report:

            
    File 5                                                               Page 1       
    --------------------------------------------------------------------------------   
    I   RABN   I   %    I Block  I Free space I Num I  Spanned  I Record lengths  I   
    I          I  Used  I Length I------------I Rec I------------I-----------------I   
    I          I        I        I Gap I Pad  I     I Num I Flg I Min I Max I Avg I   
    I----------I--------I--------I-----I------I-----I------I-----I-----I-----I-----I   
            350   100       5064      0     0      1    1    P     5060  5060  5060    
            351   100       5064      0     0      1    1    S     5060  5060  5060    
    ...

Syntax Checking with the TEST Parameter

The ADADRU functions include a syntax-checking-only mode. When the TEST parameter is specified, the ADADRU function syntax is checked, but the function is not performed.

ADADRU SPACEUSAGE TEST

Global OUTPUT and ACODE Parameter Usage

The OUTPUT and ACODE parameters can be specified globally for all ADADRU SPACEUSAGE reports requested in the run or they can be specified within a specific ADADRU SPACEUSAGE statement, where they would pertain only to that specific SPACEUSAGE report request. The syntax for declaring them globally is the same as the syntax within the ADADRU SPACEUSAGE statement:

graphics/adadru_output.png

In the following example, the OUTPUT and ACODE parameters apply to all ADADRU SPACEUSAGE reports in the run. In this example two ADADRU SPACEUSAGE reports are requested; both would return XML output:

AADRU OUTPUT=(XML,UTF8),ACODE=...
    ADADRU SPACEUSAGE FILE=...
    ADADRU SPACEUSAGE FILE=...

In the following example, the OUTPUT parameter applies only to the second ADADRU SPACEUSAGE report in the run. In this example two ADADRU SPACEUSAGE reports are requested; only the second report return XML output:

ADADRU SPACEUSAGE FILE=...
    ADADRU SPACEUSAGE FILE=...,OUTPUT='XML'...