When comparing two sets of input date, it is possible that
different compare types (FILE, LINE, WORD, and BYTE)
gives slightly different results.
In order for SuperC to detect only the types of differences that
are of interest to you, make sure that you are using the most
appropriate compare type and, if necessary, the appropriate process
options and process statements to select only the data that you
actually want compared.
Here are some of the reasons why different compare types can produce
different results:
- FILE and BYTE comparisons inspect the complete file (every
byte) for differences. LINE and WORD comparisons use designated columns
that are either specified by you or are within the default range
of columns assigned by SuperC.
For example, a FILE comparison of a file with fixed-length records of
eighty bytes compares all columns (that is, all bytes),
whereas a LINE comparison of the same file compares
columns 1 to 72 (the default).
Since the
sequence number columns in the file are ignored in the LINE compare, the
final results can be different. In this case, for consistent results,
specify the LINE compare type and the NOSEQ process option.
- LINE comparisons "pad" the shorter records with spaces
when comparing files with different record lengths.
However, BYTE comparisons only "recognize" spaces
when they are already present in the input file.
- For files with input line lengths <= 256, a LINE comparison is
performed after padding the lines to the longest line length.
Consequently two lines, originally of unequal length,
compare equally only if the spaces at
the end of the longer line coincide with the shorter line's space
padding.
- For files with input line lengths > 256,
a LINE comparison is performed on the lines without space padding.
As a result, lines of unequal length are always a mismatch.
- Different compare types have different sensitivity to being
resynchronized.
Synchronization for a LINE comparison
begins at the beginning of a line and ends at the end of a line.
Synchronization for a WORD comparison
begins anywhere on a line on any word boundary and ends at the end of a
word.
Synchronization for a BYTE comparison
extends only one byte anywhere on a line.
- LINE comparisons detect lines that have been reformatted.
However, reformatted lines have no
effect on WORD comparisons as spaces and
blank lines are ignored.
- Results may differ depending on which input file is specified
as the "new" file and which is specified as the "old" file.
The matching algorithm is sensitive to the largest
matched set it
finds between files. There may be occasions where
more than one set of matched data meets this criteria.
The rules for deciding which set to
choose among the equals depends upon the contents of each file and
which file was nominated as the "new" file.