contents.gifindex.gifprev1.gifnext1.gif

3.3.1 Examining File Information

The "info" function of vutil returns some basic information about Vision indexed files. The command syntax is:

vutil  -info  [-xpk]  [files]

If no files are specified on the command line, then vutil reads file names from the standard input. If the "-p" option is used, then vutil pauses between files and prompts the user for a "return" key. Otherwise, all the reports are run together. The "-k" option prints full details about each key, including the exact layout of a multi-segment, or split, key. Each segment is expressed as a pair of numbers--segment size (sz) and the offset from the beginning of the record (of). The "-x" option causes vutil to report additional (extended) information.

The basic information provided by the "info" function consists of:

gt490000.gif comment

gt490000.gif Vision version #

gt490000.gif # of records

gt490000.gif # of deleted records

gt490000.gif file size of segment (name of segment) (Version 4 only)

gt490000.gif total file size of all segments combined (Version 4 only)

gt490000.gif segment (size) (Version 4 only)

gt490000.gif record size (min/max)

gt490000.gif # of keys

gt490000.gif user count


If you request extended information with the "-x" option, you will also see:

gt490000.gif for each key: key size (total size and # of segments, if split); key offsets; are duplicates allowed

gt490000.gif block size

gt490000.gif blocks per granule

gt490000.gif tree height (max/min/avg)

gt490000.gif # of nodes

gt490000.gif # of deleted nodes

gt490000.gif total node space

gt490000.gif node space used

The "tree height" is the number of levels in the B-tree and is directly related to how efficient the file is If the maximum number exceeds four or five, then the file may benefit from rebuilding with a larger blocking factor (see "Rebuilding Files" below).

A value of note is the "user count". This value starts at zero, and is incremented each time the file is opened for I/O. This number is decremented when the file is subsequently closed. Under normal circumstances, the user count indicates the number of users who are currently updating the file. Should runcbl die suddenly, then this number will not be decremented. Thus, if the user counter is ever non-zero when there are no users active, then it indicates a sudden program failure and suggests that corrective action may need to be taken. At the very least, the file should be checked for integrity, but depending on the program that died, perhaps more significant action should be taken.

Basically a non-zero user count indicates that someone knowledgeable about the system should intervene and ensure that everything is okay. This can be used as an early warning system to head off some problems before they surface in a more serious form. Note that under normal operation, a COBOL coding error will not cause this condition to occur, because runcbl will usually close all of its files when it detects an error.


Note that unlike RM/COBOL, a non-zero user count is not automatically an indication of a corrupt file. It merely means that a program has died while it had files open.