Author:
Robert Sample
Subject: Reply to: Comparing two sequential files
Posted: Mon Apr 16, 2018 6:44 pm (GMT 5.5)
Quote: |
somehow I am not getting desired results. Can anyone share other ideas please. |
My first idea would be to post meaningful data. "not getting desired results" -- could mean, among other things:
- program abends with a system code
- program abends with a COBOL code
- program runs to normal completion but produces no results
- program runs to normal completion but produces incorrect results
- program generates a file status code during processing
Furthermore:
- are the two files sorted on the key?
- if not, why are you not sorting them before starting the process? Unsorted, you have to read the second file from the beginning for each record to find the match so you have to do a lot more work.
- what results do you desire?
- how do the actual results differ from what you desire?
- is your desired results what the system can produce or are you wanting something impossible to produce?
_________________
TANSTAAFL
The first rule of code reuse is that the code needs to be worth re-using.
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth