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 (January 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sun, 17 Jan 2010 11:24:45 -0500
Reply-To:   Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:   Re: Creating a new dataset-beg/end dates
Comments:   To: SAS user <sasuser4@GOOGLEMAIL.COM>

In order to answer your question the list probably needs more information about what you are trying to do. If it is simply to select based on Beg and End, you might already have the variables you need. E.g.:

data have; informat Beg yymmdd8.; informat End yymmdd8.; format Beg date9.; format End date9.; input ID Beg End; cards; 10007 19570301 19840718 10008 19570301 20070214 10009 19580604 19760630 10020 19570301 20081231 ;

data want; set have (where=(Beg<='01MAR1957'd<=End)); run;

HTH, Art -------- On Sun, 17 Jan 2010 08:28:47 -0500, SAS user <sasuser4@GOOGLEMAIL.COM> wrote:

>Hello > >Below is a sample of my data > >ID Beg End >10007 19570301 19840718 >10008 19570301 20070214 >10009 19580604 19760630 >10020 19570301 20081231 > >The objective is to create a dataset which will allow me to identify the >IDs which were included in the dataset as identified by the end variable. > >For example for ID 10020 I want to have a variable that will enable me to >identify that this ID was in the dataset in 1957, 1958, 1959.... till >12/2008. > >Any suggestions would be most welcome. > >Thanks!


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