View previous topic :: View next topic
|
Author |
Message |
pulsar
New User
Joined: 08 Nov 2007 Posts: 7 Location: India
|
|
|
|
I have a single FB file of length 80 bytes.
File1:
Record Layout:
Key;StartDate;EndDate
Code: |
AAA;2009-01-01;2009-12-31 <---row1
AAA;2008-01-01;2008-12-31 <---row2
AAA;2007-01-01;2007-12-31 <---row3
AAA;2005-09-08;2006-10-05 <---row4
BBB;2010-01-01;2011-01-31 <---row5
|
Expected Output:
Code: |
AAA;2007-01-01;2009-12-31 <---combination of row1,3
AAA;2005-09-08;2006-10-05 <---row4
BBB;2010-01-01;2011-01-31 <---row5
|
The logic here is to see if the Key(first 3 bytes) is same, then check if the dates have continuity in them (i.e There is 'no gap' between Start date of row1 and end date of row2).
Will it be possible to use Sort - or will have to stick to COBOL to achieve the same. Please help.
(Sort Installed in Shop:Syncsort)
Thanks ! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
the other topic has been deleted! |
|
Back to top |
|
|
pulsar
New User
Joined: 08 Nov 2007 Posts: 7 Location: India
|
|
|
|
Thanks enrico.
Have learnt the lesson ! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
not a problem! |
|
Back to top |
|
|
|