XValidate - Cross-validate a set of files

XValidate attempts to perform a cross-validation on a set of files to look for inconsistencies. It takes up to two parameters:

XValidate [-n] [[@]filename]

where:

Note that, if using a control file, the following control flags are supported:

Note also that, if a file contains DQE~VALFULL (even with qualifiers) then the validation level for that file is set to 0.

As discussed under SCAN_FILE the (current) validation level is stored in each record. Then, when we are doing the comparisons (see below) the programs sets up two control variables depending on the contents of the two records being compared - val_full and val_most. By default both are set to "True" implying all validation should be done. However,

This allows an incremental approach to cross-validation rather than trying to do it all at once.

Initially the program just calls SCAN_FILE for each file being cross-validated, building up data in the scandata structure. It then calls qsort to sort the magbuf and itmbuf arrays using the SCANITEM_COMP_RTN comparison routine for the latter. It then simply compares each scanitem record against the next one in the array. Generally speaking the author and compacted item title have to match before we do any comparison. However, one exception is if we have a reprint that comes from one of "our" files but doesn't appear to be specified therein. Specifically:

In this case we output a diagnostic saying the original appearance is missing.

Otherwise, assuming the author and compacted title match, we do the following checks. Note that, to minimise diagnostics, these are in a long If/Then/Else so that if one mismatch is found then the subsequent checks are omitted (even if we choose not to report the mismatch). The checks, in order, are then as follows: