CHECK-SUM

Translates the contents of a file into numerical values. This is useful for checking if a file has been updated or if the file was accurately dumped to or from tape.

Syntax

CHECK-SUM file-specifier {item-list} {selection-criteria} {USING file-specifier} {TAPE} {macro-call} {(options}

Refer to Sentence Structure for descriptions of these parameters.

Message

After processing the file, the processor displays a message in the following format:

BYTE STATISTICS OF file-name:
TOTAL = nnn AVERAGE = aaa.aa ITEMS = ii CKSUM = ccc BITS = bbb

The variables in the message mean the following:

file-name is the file specified in the sentence.

nnn is the total number of bytes in the items selected.

aaa.aa is the average number of bytes in each item.

ii is the number of selected items.

ccc is the checksum of all selected items.

bbb is the total number of bits set to one in the selected items.

Comments

After you enter data into a file or before you dump a file to tape or load from tape, you can run CHECKSUM and record the values generated. You can compare these against subsequent values.

Example

:CHECK-SUM ROOMS
BYTE STATISTICS OF ROOMS:
TOTAL = 140 AVERAGE = 4.82 ITEMS = 29 CKSUM = 54141 BITS = 555

In this example, only the file name is entered and no selection clauses are specified.  Therefore, the procedure selects all items in the file.