To monitor caching

Add the following entries to the same configuration file that contains the CACHE entry.

STATSFILE FileName CACHESTATS TRUE

For FileName, use either a full path name or a relative path name for the output file, but do not use an environment variable. If you do not add the STATSFILE entry, the system puts the output in the job log.

The system generates one report for each program. If a program is used more than once, each instance of the program generates a set of statistics appended to the end of the output file.

Example

The output file shows statistics for each file named in the program configuration file. The following example shows statistics generated by a program accessing the Apvenmast file.

Cache Statistics for file APVENMAST

    Configured to cache 600 records
    600 Records added to cache
    0 Records changed in cache
    0 Records deleted from cache
    0 Attempts to exceed cache size
    0 Cache Cleared

    Index 0 statistics
        Index was updated from the beginning
        11623 Attempted Finds
        11023 Successful Finds

    Index 1 statistics
        Unused

    Index 2 statistics
        Unused
          .
          .
          .

The number of records to cache for this file is set to -1, meaning that all records are cached. In the example, the cache adds all 600 records from the table as they are read, and then proceeds to read from the cache rather than the file on disk. The example shows no changes being made to the records, and no records being deleted. The fact that reads are being repetitively performed on unchanging records indicates that caching is appropriate in this instance.