Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
I seen a few examples of matching two files but the matching keys are usually same record position in the record.
There are plenty of examples of matching keys in different positions.
Quote:
I want to match FILE1 to FILE2 and write out FILE2 matches to FILE3
I'm not sure what you mean by "FILE2 matches". Do you mean the output should have the records in file2 with a match in file1? Or something else? Please explain and show the expected output records.
Quote:
Then FILE 1 has to be matched on POS 26 For 11, ... AND 13 for 8
In 26,11 of the first record for File1 I see:
G0000000323
Don't you really mean 27,11 which has:
00000003235
In 13,8 of the first record for File1, I see:
6:15:53A
Don't you really mean 12,8 which has:
16:15:53
In the future, please try to be clear and accurate when stating requirements. That will help both of us.
Joined: 15 Dec 2005 Posts: 72 Location: RALEIGH NC, USA
I'll give simpler record examples, but still asking the same scenario.
The output file should contain the records from File 2 that match File 1 after making the date edit to File 1 = YYYY-MM-DD. e.g. The first record in File1 is 08/21/06, so it should be formatted to 2006-08-21 to match the same format as the date in File 2
Output File 3 should have records 1, 3 and 6 from File 2
2006-08-21-18.18.46.88812900000001534C 2006-08-20-16.17.53.00542400000003235C 2006-08-17-14.46.48.31572700000004818C
I hope this helps you figure a solution...
Thanx in advance
Steven
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
I figured out the solution a long time ago. I just wanted to make sure I understood the requirements correctly. Here's a DFSORT/ICETOOL job that will do what you asked for: