How can I create a function which reads the data from the file and compare the current row with the previous row to check if the data has changed or not? if the data in the current row is same as the previous one then save that data with ID-1 but if the next record is different than the previous record then save a new record with ID-2?
I just want to accumulate the amounts which are in those three rows. For example, I have three fields and if the record number is same as the previous record then I want to accumulate the numbers and write a record into the file