Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Just do a simple SORT with a COPY operation and have an INCLUDE for the years that you want. As far as I can tell. Otherwise, more explanation of what the problem is and sample of expected output.
Need to copy all the accounts having complete 12 months data until first gap found.
Trying to achieve this in sort or icetool.
Eg:
acc date
---**********
1212014-12-31 /\
1212014-11-30
1212014-10-31 ||
1212014-09-30
1212014-08-31 ||
1212014-07-31
1212014-06-30 c
1212014-05-31 o
1212014-04-30 p
1212014-03-31 y
1212014-02-28
1212014-01-31 t
1212013-12-31 h
1212013-11-30 i
1212013-10-31 s
1212013-09-30
1212013-08-31 r
1212013-07-31 a
1212013-06-30 n
1212013-05-31 g
1212013-04-30 e
1212013-03-31
1212013-02-28 ||
1212013-01-31 \/
1212012-12-31
1212012-11-30
1212012-10-31
1212012-09-30
1212012-08-31\
1212012-06-30/ date gap
1212012-05-31
1212012-04-30
1212012-03-31
1212012-02-28
1212012-01-31
1212011-12-31
1212011-11-30
1212011-10-31
1212011-09-30
1212011-08-31
1212011-07-31
1212011-06-30
1212011-05-31
1212011-04-30
1212011-03-31
1212011-02-28
1212012-01-31
2014,2013 -> should omit from 2012 onwards even though 2011 has complete data.
Are the months always in order, even for imcomplete set?
I mean that the incomplete set can consist of months 12,11,10,9,8,7,6 (rest from 5 are not present) OR it can be like 12,10,7,3,1. That is months are missing in between.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
N.NIRMALRAJ,
Yes, that's why we asked. Your data showed something different.
You also should address RaghulG31's question about what is missing when something is missing. Can the entire year be missing? Can there be "gaps" within data which is present. Where there is data but it is busted, is it still in descending date sequence.
You'll need to change the key on Maghesh's contribution (1,3,A,4,4,D instead of 1,7,D) and then you'll need to "reset" the "don't use any more records" flag for the first record of a new account (not the first record of a new account/year).