L S C 0 M P Compares two files, parts of files, diskettes, or parts of diskettes for a character for character match. The proper syntax is : LSCOMP filespec1 TO filespec2 (parm,parm,...) LSCOMP :drivel TO :drive2 (parm,parm,...) The allowable parameters are REC= Starting record number of the filespecs at which the compare will begin (default is 0). NUM= Number of records of a filespec or sectors of a disk to compare. ALL Display each non-matching byte. PRINT Send display to *PR as well as *DO. CYL= Cylinder at which to start compare between two drives (default is 0). SEC= Starting sector of a diskette to compare (default is 0). Abbr: REC=R, NUM=N, ALL=A, PRINT=P, CYL=C, SEC=S This utility compares two files or two entire diskettes to determine whether or not the information in or on them is identical. It is usually performed after a BACKUP or a COPY to determine the validity of the data. Observe the following command and output that is generated: LSCOMP MAY/DAT:3 :4 MAY/DAT:3 contains 17 sectors, EOF offset = 70 MAY/DAT:4 contains 17 sectors, EOF offset = 70 Notice that the second filespec was indicated by a drivespec. This is the ONLY exception to a complete filespec which is allowed. Since the files proved to be identical, only the number of compared sectors followed by the end-of-file offset were displayed. In the case of differing files the following would occur: LSCOMP FISCAL82/DAT:3 FISCAL82/DAT:4 (R=4) Posn= X'0005,00 FISCAL82/DAT:3 = X'20, FISCAL82/DAT:4 = X'00 29 bytes did not match. Posn= X'0005,B0 FISCAL82/DAT:3 = X'54, FISCAL82/DAT:4 = X'00 32 bytes did not match. FISCAL82/DAT:3 contains 18 sectors, EOF offset = 100 FISCAL82/DAT:4 contains 18 sectors, EOF offset = 100 The display shows the record number of a discrepant sector followed by the relative byte, and the contents of that byte in each filespec. The second line displays the total number of subsequent bytes which do not match. If the ALL parameter had been specified, each of the sixty-one bytes would have been displayed in the first format. Since the parameter R=4 was specified, the compare began at record 4. To compare one disk to another use drive numbers instead of filespecs. The starting cylinder and sector number may be specified either in X'00' format or as a decimal integer. The number of contiguous sectors to compare may also be specified by using the NUM= parameter. Unlike file to file comparisons, the disk to disk compare will display the currently accessed sector relative to the current cylinder. As much information as possible will be read into memory from the source drive (the first drivespec). This information will then be compared to the destination drive. If discrepant bytes are detected the following will appear on the video: Cyl MOD, Sec X'00, Byte X'00, Drive 2 = X'6D, Drive 3 = X'31 3078 bytes did not match. If the ALL parameter had been specified then each different byte would display in the first line format. To send the output to the printer as well as the video, specify the PRINT parameter.