How to Reload Files using Discover Worksheets ============================================= Discover estimates the slack and disorder for each key sequenced file during a scan. This information is kept in the file history record in Discover's database. Reloading Using a Single Worksheet: =================================== Discover comes with a number of "builtin" or sample worksheets, one of which is called DISORG. This worksheet collects the names of all files which are candidates for reloading. The DCI command INFO WS DISORG will list the parameters of the worksheet. In order for this to all work, you need to configure volumes of interest using the DCI program: For each volume, enter: ALTER VOL SLACK 50 DISORDER 20 (you can use a pattern like $DATA* for name). This will let Discover know that you are interested in key sequenced files which have a slack bigger than 50% or are more than 20% disordered. (Discover measures disorder as a percentage of the data blocks which are not in sequential order - This is roughly equivalent to the number of chains reported by TRA). Check the volume configuration with: INFO VOLUME You should also check that the KSEQCHECKSIZE parameter is appropriate. (this value defaults to 100KB). Any files smaller than this will not be checked for slack or disorder. You can change this if you need to with the alter volume command: ALTER VOLUME KSEQ 250 KB After the next Discover scan, you will be able to see slack and disorder values for key sequenced files with the DISPLAY FILE HISTORY command. As well, any files which have too much slack or are too disordered will end up on the DISORG worksheet. You can see the files on the worksheet by entering a LIST WS DISORG command. Files which are added to this worksheet automatically get a "disposition" of "reload". You need to check that the reload disposition is configured appropriately. Use: SHOW DISP RELOAD To change it, use: SET DISP RELOAD=RELOAD "RATE 10 SLACK 43 %PARTOF" (make sure you include the quotes and the %PARTOF). Once files have been collected onto the worksheet, they can be selectively processed. Each file added will have a state of "New". As you review each file, you can: 1. remove it from the worksheet if you do not want it processed: DELETE FILE $a.b.c FROM WS DISORG 2. leave it alone for processing at some later time, or 3. sign it off for reload processing: SIGNOFF ! WS DISORG FILE $a.b.c Once you have signed off the files which should be reloaded, you can schedule the worksheet for processing. (Only signed off files will be reloaded): DO WS DISORG AT 21 NOV 2001 2:00 (this will schedule the worksheet for execution at 2am on Nov 21). Only the signed off files will be reloaded. The reloads will occur one after another. There are a variety of other options with Discover, including automatically scheduling a reload for a file without requiring signoff, or setting up multiple worksheets in order to have reloads run in parallel. (see "Reloading using multiple worksheets" below) It is possible to automatically schedule the DISORG worksheet to run at specific times on a regular basis (for example every saturday): ALTER WS DISORG SIGNOFF AUTO ALTER WS DISORG DO BETWEEN 0:00 AND 14:00 ON SAT You may also be interested in the SKAN utility, which you will find in the Discover subvolume. This program is a stand-alone utility which reports slack and disorder for a file. It is considerably faster than TRA. Reloading Using Multiple Worksheets =================================== Often, it is a simplification to reload all files through one worksheet. Typically there will be different criteria and different priorities for different classes of file. In this example, we will set up two worksheets. One will reload production files ($*.PROD.*), and another will be used for development files ($*.DEVDB.*). By using file patterns to separate out specific sets of files, you can distribute processing across as many worksheets as is desired. We will not use the volume SLACK and DISORDER attributes to select the files, but it necessary that these values be nonzero, otherwise Discover will not estimate slack for any files on the volume. For this example, we will set these values to 80% ALTER VOLUME $* SLACK 80 DISORDER 80 As well, we must set the KEY SEQUECNCED FILE CHECK SIZE for each volume. Any key sequenced files that are smaller than this value will be ignored. ALTER VOLUME $* KSEQ 500 KB For production files, we will create a worksheet called RLPROD SET FILTER FILTERPROD=$*.PROD.* WHERE (SLACK > 25) OR (DISORDER > 50) OR (INDEXLEVELS > 3) SET DISP RELOADPROD=RELOAD "CPU 0 RATE 25 SLACK 10 %PARTOF" ADD WS RLPROD ALTER WS RLPROD FILTER FILTERPROD ALTER WS RLPROD DISPOSE RELOADPROD ALTER WS RLPROD SIGNOFF AUTO ALTER WS RLPROD DO BETWEEN 0:00 AND 6:00 For development files, we will create a worksheet called RLDEV SET FILTER FILTERDEV=$*.DEVDB.* WHERE (SLACK > 50) OR (DISORDER > 50) OR (INDEXLEVELS > 5) SET DISP RELOADDEV=RELOAD "CPU 2 RATE 5 SLACK 10 %PARTOF" ADD WS RLDEV ALTER WS RLDEV FILTER FILTERDEV ALTER WS RLDEV DISPOSE RELOADDEV ALTER WS RLDEV SIGNOFF AUTO ALTER WS RLDEV DO BETWEEN 18:00 AND 8:00 Note that development files have different criteria for inclusion in the worksheet, as well as a different execution window.