Frank,I still see that CIC4 has no overlapping dates.If we have closer look at it comparing to the previous records,I can say that the order of dates is reversed and it is possible in my case.
As per my information,there would be only 2 records for each CIC and FAC.(Can we think of any technique if we have more than 2 by any chance).
Yes,Date_Eff always less than the Date_Off .
Considering the order of dates too, for pair of records that does not have overlapping dates:
Thanks for the code kolusu.Could you please explain the logic used in the sort card ?
I tried to get the logic behind the code and found that the first record forms that base for comparison and also it processes more than 2 records for same CIC & FAC.However,I was just thinking whether below scenario also could be handled by small changes to the code or not -
In this above case,when you compare the first 2 records,they dont have any overlapping dates.
But,when the 2nd record is compared to other records,they have overlapping dates.So ideally,we need to get the other 3 records in the output leaving out the first record.
This might happen with only 3rd and 4th records too having the overlapping dates,leaving the first 2 records.All these cases arise when we have more than 2 records with same CIC and FAC.
Could you please throw some light on how to handle these scenarios also in the sort card or do we need to go for a cobol program for this handling?
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
maddyinfy,
What happens if you have 10 records and the first 8 do NOT have a overlap but the 9th record has an overlap. How do you handle such case? It is like you need to verify each record with every other record of the same key. If the number of records per key varies then you are better off coding a program.