Date: Tue, 14 May 2002 14:08:57 -0700
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "David L. Cassell" <Cassell.David@EPAMAIL.EPA.GOV>
Subject: Re: OVERLAPPING RECORDS
Content-type: text/plain; charset=us-ascii
Stacey <stacey.a.holland@HEALTHPARTNERS.COM> wrote [in part]:
> YOU CAN SEE THERE IS OVERLAP IN SOME OF THESE RECORDS - I WOULD WANT
> THE FINAL RESULT TO LOOK LIKE THE FOLLOWING:
> EFFDT ENDDT DRUGCOV
> 1/1/96 5/31/96 N
> 6/1/96 12/31/96 Y
> 3/1/97 12/31/97 Y
> 1/1/98 8/31/98 N
> WHERE DRUGCOV = Y TAKES PRECEDENCE.
I see that you have already received a two-pass solution.
A one-pass solution is available just by listing all your
drug-coverage days in an array of SAS date values. But before
I write out code to do such a thing, I have a couple of questions.
Shouldn't there be another record in your output? One smack
in the middle, so the output would look like:
EFFDT ENDDT DRUGCOV
1/1/96 5/31/96 N
6/1/96 12/31/96 Y
1/1/97 2/28/96 N
3/1/97 12/31/97 Y
1/1/98 8/31/98 N
Are there multiple IDs or groups, where you have to run through
this process for each one? If so, could you give a short example
of what the inputs and outputs should look like?
Do you want to have your years as four-digit years, to avoid Y2K
And finally, what is the range of dates you want your results
David Cassell, CSC
Senior computing specialist