hi,
The program will read 2 input files and write one output file.
The date criteria is to read input-file1 for a given associate & date and to
eliminate record(s) from input-file2 with a date closer to date in
input-file1. Example is provided below..
Input-File1 (Sorted by Associate-id and Date)
===========
Associate-id Date
------------ ----
1 2005/06/24
5 2005/07/12
5 2005/07/15
5 2005/07/15
10 2005/06/26
11 2005/06/24
13 2005/10/10
Input-File2 (Sorted by Associate-id and Date)
===========
Associate-id Date
------------ ----
1 2005/06/22
1 2005/06/23
1 2005/06/25
1 2005/06/26
1 2005/06/27
2 2005/08/26
3 2005/06/22
4 2005/05/10
5 2005/07/12
5 2005/07/12
5 2005/07/16
5 2005/07/20
5 2005/07/21
5 2005/07/22
10 2005/12/20
11 2005/06/22
11 2005/06/25
13 2005/07/22
Output-File (Contain all eliminated records from Input-File2)
===========
Associate-id Date
------------ ----
1 2005/06/23 << Here the date closer to 06/24 is 06/23 and not 06/25
5 2005/07/12 << Here the date matches in both the input files
5 2005/07/16 << Here the date closer to 07/15 is 07/16
5 2005/07/20 << Here the date closer to 06/15 is 07/20
10 2005/12/20 << Here the date closer to 06/26 is 12/20
11 2005/06/25 << Here the date closer to 06/24 is 06/25 and not 06/22
13 2005/07/22 << Here the date closer to 10/10 is 07/22
Any suggestions and ideas would be appreciated.
thanx in advance for your time and effort.
The program will read 2 input files and write one output file.
The date criteria is to read input-file1 for a given associate & date and to
eliminate record(s) from input-file2 with a date closer to date in
input-file1. Example is provided below..
Input-File1 (Sorted by Associate-id and Date)
===========
Associate-id Date
------------ ----
1 2005/06/24
5 2005/07/12
5 2005/07/15
5 2005/07/15
10 2005/06/26
11 2005/06/24
13 2005/10/10
Input-File2 (Sorted by Associate-id and Date)
===========
Associate-id Date
------------ ----
1 2005/06/22
1 2005/06/23
1 2005/06/25
1 2005/06/26
1 2005/06/27
2 2005/08/26
3 2005/06/22
4 2005/05/10
5 2005/07/12
5 2005/07/12
5 2005/07/16
5 2005/07/20
5 2005/07/21
5 2005/07/22
10 2005/12/20
11 2005/06/22
11 2005/06/25
13 2005/07/22
Output-File (Contain all eliminated records from Input-File2)
===========
Associate-id Date
------------ ----
1 2005/06/23 << Here the date closer to 06/24 is 06/23 and not 06/25
5 2005/07/12 << Here the date matches in both the input files
5 2005/07/16 << Here the date closer to 07/15 is 07/16
5 2005/07/20 << Here the date closer to 06/15 is 07/20
10 2005/12/20 << Here the date closer to 06/26 is 12/20
11 2005/06/25 << Here the date closer to 06/24 is 06/25 and not 06/22
13 2005/07/22 << Here the date closer to 10/10 is 07/22
Any suggestions and ideas would be appreciated.
thanx in advance for your time and effort.