ctfchk is a standalone c-tree utility that calculates the checksum on all active records in a fixed-length c-tree data file. It reads active records from a fixed-length c-tree data file in physical order and outputs a checksum and active record count. The utility uses the CRC-32 algorithm to compute the checksum.
This utility can be used to compare the record contents of two fixed-length data files. Two c-tree data files that contain the same active record images in the same order will generate identical checksums. Two c-tree data files whose active record contents differ will generate different checksums (subject to the limitations of the CRC-32 algorithm).
Operational Model:
Usage
ctfchk <filename> [-skpchk] [-logcrc] [-logbyt]
[-logrec <record number>] [-opencrpt]
Where:
When the file is already opened by another instance (Server, for instance), trying to open it to calculate the checksum will fail with error FCRP_ERR (14, File Corrupt at Open). If the -opencrpt option is added, the utility tries to open the file using the ctOPENCRPT filemode. If this second open attempt succeeds, the utility outputs the following message and proceeds to calculate the checksum of all active records in the file:
NOTE: This file's update flag is set. Opened file using ctOPENCRPT mode.