Hi,<br><br>It is not so easy to do comparing of two files.<br>First check your operating system utilities, for example:<br>for MS DOS/Windows use: FC file1 file2<br>for CompaqVMS use: Difference file1 file2<br>...<br>These utilities work intelligently, e.g. they don't match<br>each *pair* of records (one from file1 and one from file2)<br>but jump thru records which are "non-comparable" from<br>one file with records from another ... (it is very good<br>for comparing text files). There are also many switches<br>provided with them (especially for Diff for VAX/Alpha<br>VMS computers)<br>If you have to do comparing in your COBOL program,<br>try to read files alternatively:<br><br> OPEN INPUT FILE1 FILE2. (output file3)<br><br> MOVE 0 TO END1 END2.<br><br>PERFORM COMPARE-IT UNTIL END1 = 1 OR END2 = 1.<br><br>THE-END.<br> CLOSE FILE1 FILE2. (file3)<br> STOP RUN.<br><br>COMPARE-IT.<br> READ FILE1 AT END MOVE 1 TO END1.<br> READ FILE2 AT END MOVE 1 TO END2.<br> IF RECORD-1 NOT = RECORD-2<br> DISPLAY "*** file1: ***"<br> DISPLAY RECORD-1.<br> DISPLAY "-------------------------"<br> DISPLAY "*** file2: ***"<br> DISPLAY RECORD-2.<br>(YOU CAN ALSO USE WRITE RECORD-3 to file-3 if you want the differencies<br>written in a separate file)<br><br>note that this is simple checking. If your files are formatted it could work.<br>The real thing is to ignore or not to ignore "white space" (repetitive blanks,<br>tabs etc), to ignore upper and lower case etc.<br><br>Georgi, ;-)