# check-sum command

The check-sum command calculates a hexadecimal *checksum* for a specified attribute, or the entire item if no
attribute is specified, and produces result as a list. The checksum
statistics change whenever a file is updated, providing a means to
determine if a file has been changed.

When an item list is specified, statistics are calculated
only for the selected item-IDs. If not specified, the entire file
is used. If an attribute name is specified, statistics are generated
only for the attribute name or number specified. If the attribute
name is not used, or if the specified attribute number is 9999, the
entire item is used. The attribute mark trailing the specified attribute
(or item) is included in the statistics.

To use checksum statistics, check-sum all files, or portions of files to be verified
and record the output statistics. At a later time, repeat the check-sum process. To verify that the files have not
changed, manually compare the two checksums.

## Syntax

```
check-sum file.reference {item.list} {selection.criteria} {modifiers} {(options)}
```
on the first value in the attribute. Further, each item-ID
only displays once, assuming that its display is not suppressed.

## Example(s)

```
check-sum bp
Byte statistics for : bp

 Total Average Maximum Min
Bytes = 39546 919.67 8117 13
Values = 1614 37.53 320 1
Attributes = 1614 37.53 320 1
#Items = 43
Chksum = EBF3CE55
Bits = 121447
```

## See also

- [chksum command](https://d3codex.com/tcl/chksum-command/)
- [AQL command categories](https://d3codex.com/access/aql-command-categories/)
- [count command](https://d3codex.com/access/count-command/)
- [File reference (Access Query Language)](https://d3codex.com/access/file-reference-access-query-language/)
- [Item list](https://d3codex.com/access/item-list/)
- [Modifiers](https://d3codex.com/access/modifiers/)
- [Options (Access Query Language)](https://d3codex.com/access/options-access-query-language/)
- [Selection criteria](https://d3codex.com/access/selection-criteria/)
- [istat command](https://d3codex.com/access/istat-command/)
- [u1070 user exit](https://d3codex.com/access/u1070-user-exit/)

---
Source: https://d3codex.com/access/check-sum-command/ - part of the D3Codex reference.
