BCMP - block mode file compare.

Syntax:

BCMP file1 file2 [options]

Files=number         +Gfrc
Name=element         Size=N
(+|-)Verbose

Options:

file1 file2
are two files that you want to compare.
Files=number
is used with the +Gfrc option when you want to compare multi-file GFRC files. By default, +Gfrc stops comparing files at the first logical end-of-file. Files=number says that the comparison should continue until BCMP has compared "number" logical files or has reached the physical end of the file. The given "number" must be 1 or greater.
+Gfrc
compares the files using GFRC format information. BCMP only compares the portions of each llink encompassed by the block length in the BCW. BCMP checks the block serial numbers of each BCW for validity, and also checks the block length (which must be less than 320 words). Comparison stops at the first logical end-of-file, unless you also specify Files=number. You cannot use +Gfrc with Name=.
Name=element
compares only the named element. In this case, both files should be hstar files that contain the named element. BCMP compares all sectors of the element including the DCW block and any relocation blocks, if present. You cannot use Name= with +Gfrc.
Size=N
only compares the first N llinks of the files (where N is a positive integer). If either file is less than N llinks long, BCMP uses the minimum size of the two files.
+Verbose
lists the sector and word offset for each word where the files differ. The default is just to report a count of the words that did not match. If you specify +Gfrc, +Verbose reports differences using the format:
GFRC file #n, llink 0n word 000n: X != Y

where X and Y are 36-bit words given in octal.

-Verbose
suppresses the equality message if the contents compare equal. The default action is to print an equality message.

Description:

BCMP lets you compare two files to see if they are equal. Probably the most common use would be to see if two executable programs are identical (for example, if you want to see if two versions of a program really are different). Using the Name= option, you can compare individual elements of Hstar files.

Normally, you would not use BCMP on text files; use DIFF instead. See "expl diff" for more on DIFF.

BCMP performs a simple sector-by-sector comparison. It works on a yes/no basis; either the sectors are identical or they aren't. With +Verbose, BCMP shows the machine words where the sectors differ.

BCMP sets the switch word to indicate the result of the comparison. If an error occurs (for example, one of the files cannot be found), bits 18-26 are all turned on. Otherwise bits 18 to 24 are turned off. Bit 25 is turned on if at least one pair of words did not compare equal. Bit 26 is turned on if one of the files or Hstar elements is smaller than the other.

Copyright © 1996, Thinkage Ltd.