I have following 4 fields in 2 different files. Let us call 1 file as Estimate file(Master file) and another file as Payment file(which can have duplicates).
We have sorted both the file on the following basis Claimno, Client no,
Estimate code, Cover code.
All the above mentioned fields are Alphanumeric.
Can any of you give me logic to match the estimate file records with payment file records and write down the estimate file?
IF EST-CLAIM-NO = PYT-CLAIM-NO AND
EST-CLT-NO = PYT-CLT-NO AND
EST-EST-CDE = PYT-EST-CDE AND
EST-COV-CDE = PYT-COV-CDE
The above code can easily find out matching records.
But I need to process record by record. As Estimate file is Master file. We need to pick one record from Estimate file and need to check in payment file for all the matching records for all the above mentioned fields.
Now problem I have here is if it doesn't match which file should i read now? Estimate file or Payment file? How can i check which is greater as it is alphanumeric?
Give me a shout if you require more clarification.