Solution for EOF record missing in file1 during file comparison in cobol
is Given Below:
Hi I have written cobol file comparison program .In that both input1 and input2 have duplicates.
I got all the keys in output file and I am missing eof-input1 record in output.as I know I have handle the EOF condition correcly..
My scenario is I have to compare file1 and file2.
Need to move input 1 record to output after performing some process.
need to move file1 record to output after performing some process.
In main para..
I did process until end-of-input1.
Please suggest some solution to get my last input1 record.
I didn’t use any temp variable to move my IP data and for processing…
Mainpara. Read file1. Read file2. Process para until end of input1. Close files. Process para. If in1>in2 Perform read file2 until eof2 or in2>=in1 End-if. If eof2 = 'N' If In2=in1 Some process End-if If In2 >in1 Some process End-if Else Moves End
Test op: 134
Required op: 1345