LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2011, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 7 Oct 2011 08:00:09 -0400
Reply-To:     Nat Wooding <nathani@VERIZON.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Nat Wooding <nathani@VERIZON.NET>
Subject:      Re: Dates' gap
In-Reply-To:  <1317987136.28509.YahooMailNeo@web39420.mail.mud.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Irin

Try the following code. Also, by your rules, the fourth record should be output.

For any others who may play with this code, when I copied the data from the email, the blanks came across as a non-printing hex character that was different from a blank.

Nat Wooding

Data Irin1; informat memid $5. Enrdate EnrTermdate mmddyy10.; input memid $5. enrdate enrtermdate;

cards; 92222 01/10/2009 02/12/2009 92222 02/13/2009 03/22/2009 92222 03/30/2010 04/29/2010 * 92222 05/30/2010 06/10/2010 92222 06/12/2010 10/13/2010 * 92222 10/14/2010 12/31/2010 run; Data IrinWants; set irin1; by memid; if first.memid then return; if enrdate -lag(enrtermdate) gt 1 ; format enr: mmddyy10.; run;

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Irin later Sent: Friday, October 07, 2011 7:32 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Dates' gap

I have a table with multiple fragments of continues enrollment. I marke with astericks records after gap in dates

memid EnrDate enrTermDate 92222 01/10/2009 02/12/2009 92222 02/13/2009 03/22/2009 92222 03/30/2010 04/29/2010 * 92222 05/30/2010 06/10/2010 92222 06/12/2010 10/13/2010 * 92222 10/14/2010 12/31/2010

have to extract: - those records for each patients after gap in dates between fragments of enrollment . For example, I need for the patient with memid=92222 92222 03/30/2010 04/29/2010 * 92222 06/12/2010 10/13/2010 *

How can I implement it with ode? Could you please give me a hand? Thank you in advance,

Irin


Back to: Top of message | Previous page | Main SAS-L page