Identify Overlapping date range



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Identify Overlapping date range

Postby kvlsi » Wed Aug 27, 2014 9:13 am

Hi Friends,

I have input file like given below

key, eff-date, term-date

KEY1 20010101 20101231
KEY1 20090303 20101231

KEY2 20090101 20111231
KEY2 20090301 20091231

KEY3 20090303 20101231

KEY4 20090101 20091231
KEY4 20110101 20191231

I want the output like given below as I have to identify the overlapping date ranges and if any such records found then I have to replace minimum eff date and max term date long with overlapping flag 'Y" at end.

KEY1 20010101 20101231 Y

KEY2 20090101 20111231 Y

KEY3 20090303 20101231

KEY4 20090101 20091231
KEY4 20110101 20191231

Please help me on this requirement.
kvlsi
 
Posts: 2
Joined: Wed Aug 27, 2014 8:58 am
Has thanked: 0 time
Been thanked: 0 time

Re: Identify Overlapping date range

Postby BillyBoyo » Wed Aug 27, 2014 10:17 pm

Are there a maximum of two records per key?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Identify Overlapping date range

Postby kvlsi » Tue Sep 09, 2014 10:53 pm

no it may have more than to keys
kvlsi
 
Posts: 2
Joined: Wed Aug 27, 2014 8:58 am
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post