SCOM is a utility to compare two source files. To compare two text files: :RUN SCOM; INFO="" The INFO string syntax is: ,,[options],[#match],[lastcolumn] where: , are the input files to compare. (QEDIT files are allowed) can be any combination of the following without (run them together!): BO prints the lines common to both files DU ask LaserJet for Duplex printing D1 Turns on level 1 debugging D2 Turns on level 2 debugging F1 prints the lines unique to file 1 F2 prints the lines unique to file 2 IB ignore blank characters (deblank before comp) IC ignore case differences (upshift before comp) LJ use LaserJet codes for 80 lines/pg, 132 chars QU "Quiets" the output, suppressing lines of all dashes, and END OF FILE TB trailing blanks on a line are significant TG Tells SCOM to print a "tag" of 0, 1, or 2 on left edge of each output line. 0 means the line was in both files, 1 means it was in file F1, and 2 means file F2 TR truncate output to 79 characters NOTE: if SCOM aborts for: FORTRAN I/O ERROR 910: ACCESS PAST END OF RECORD ATTEMPTED then you must either file equate FTN06 to a larger record size *or* use the TR flag. (E.g.: FILE FTN06;REC=-132,16,V,ASCII) If none of F1, F2, or BO are specified then F1 and F2 is assumed. If no options are specified, the default is: F1F2 <#match> specifies the number of consecutive lines which must match in the input files before a mistmatch is ended. The default value is 3. the last column in a line to compare (the first column is column number 1). Default is the last column of each line. Set to 72 to ignore sequence numbers in 73..80. ---------------------------------------------------------------- Pressing control-Y will result in a report of the current comparison status, and will give you an opportunity to abort the comparison. ---------------------------------------------------------------- Example UDC: compare f1, f2, options=F1F2, nmatch=3, width=72, ftn06=-256 if !ftn06 <> 0 then file ftn06=$stdlist;rec=!ftn06,1,v,ascii endif run scom.pub.allegro;info="!F1,!F2,!OPTIONS,!NMATCH,!WIDTH";nocb ******** ---------------------------------------------------------------- Example run: (I took the above text, and changed the "F1F2" in the example UDC to "f1f2" ... so there is one line difference) :compare scom.help, aaa SCOM version 2.10 (SS) 98/10/23 File1 = SCOM.HELP , File2 = AAA nmatch = 3, compln = 72 Options: F1F2 ---------------------------------------------------------------------- 63 63 64 compare f1, f2, options=F1F2, nmatch=3, width=72, ftn06=- 64 compare f1, f2, options=f1f2, nmatch=3, width=72, ftn06=- 65 65 if !ftn06 <> 0 then (files match again) ---------------------------------------------------------------------- Comparison of files complete *** found 1 difference *** total CPU: 0, elapsed: 0 seconds. In the above, the "63 63" shows the last line that was the same in both files (it happened to be a blank line, and was at record 63). The first "64 compare..." shows the sequence of lines in the first file (SCOM.HELP) that don't appear in the second file. The second " 64 compare..." shows the sequence of lines in the second file (AAA) that don't appear in the first file. (It's up to the user to notice that the difference is in the f1f2/F1F2.) The "65 65 if..." is the first line that's common to both files after the mismatch area. Here's an example where we add a line to AAA, just after record 64: :compare scom.help, aaa SCOM version 2.10 (SS) 98/10/23 File1 = SCOM.HELP , File2 = AAA nmatch = 3, compln = 72 Options: F1F2 ---------------------------------------------------------------------- 63 63 64 compare f1, f2, options=F1F2, nmatch=3, width=72, ftn06=- 64 compare f1, f2, options=f1f2, nmatch=3, width=72, ftn06=- 65 this is an added line 65 66 if !ftn06 <> 0 then (files match again) ---------------------------------------------------------------------- Comparison of files complete *** found 1 difference *** total CPU: 0, elapsed: 0 seconds. Note the record numbers (65 and 66) on the "65 66 if..." line. //