Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
Here is a suggestion.
Take all four files and concatenate them into a single SORT sorting on the date field and using FIRST. The OUTPUT file would then be a dataset consisting of all possible dates. So SORT together FILEA, FILEB, FILEC, and FILED using FIRST and create FILEE.
Then take the OUTPUT of the 1st sort (with all possible dates - FILEE) and sort it with the 1st of the 4 files (FILEA) using NODUPS. The output of this sort would be records from the FILEE that did not match a record on FILEA, therefore they were missing.
Then take the OUTPUT of the 1st sort (with all possible dates - FILEE) and sort it with the 2nd of the 4 files (FILEB) using NODUPS. The output of this sort would be records from the FILEE that did not match a record on FILEB, therefore they were missing.
Then take the OUTPUT of the 1st sort (with all possible dates - FILEE) and sort it with the 3rd of the 4 files (FILEC) using NODUPS. The output of this sort would be records from the FILEE that did not match a record on FILEC, therefore they were missing.
Then take the OUTPUT of the 1st sort (with all possible dates - FILEE) and sort it with the 4th of the 4 files (FILED) using NODUPS. The output of this sort would be records from the FILEE that did not match a record on FILED, therefore they were missing.
If you need the DFSORT setup, I'm sure Frank Yaeger could code this up in no time.
Hi,
Mention which file you are using as a reference file, having all the dates in it. Then we can run a comparison of each file( e.g File2, File3, etc) with that reference one(e.g File1) to get the missing dates/Records in that(File2/File3....etc).
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
I looked at the Smart DFSORT Tricks manual section "Create files with matching and non-matching records" it looks like it could be applied to four files.
I think if you stretched the 11 and 22 to 1111, 2222, 3333 and 4444 and added 2 more splice statements, those records that, at the end had a 1234 appeared in all four files and for instance, a record that had 1123 was missing from the second file.
Give it a look and maybe it can solve your problem.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
kalukakkad,
cpuhawg has the right idea assuming you want to take the set of all dates in all of the files and then find the missing dates in each file. Here's a DFSORT/ICETOOL job to it.