in reply to Re: Code efficiency / algorithm
in thread Code efficiency / algorithm

A match is when the number (date) in datafile2 is within the range values in datafile1. So, for example, 200110100 in datafile2 is a match because it is within CDC Inc. 200110014 - 200110325 range. So the output file would include the '200110100,some text here,etc' line.

I am still debating how the output should look like. One option is to break the output into 2 files--(1) a matched results file that includes the header of datafile2 and all the matched lines and (2) a reports summary file that displays some metadata... such as, how many total records processed, how many such records belong to each company and how many in each range. The other alternative is to display something like this:

#ABC Corp. 200210100,some text here,etc #1 record found for the 20021 range id. 200211015,some text here,etc ... #x records found for the 20022 range id: #x total records found for ABC Corp. #CDC Inc. ... #57 total records found

Let me know what you think.

Thanks!

David