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 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 8 Jan 2004 10:17:22 -0800
Reply-To:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:   Re: Working with dates
Comments:   To: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>

I'LL BET 10-1 GREG'S A MAINFRAMER - WE ALL TYPE IN CAPS.

PAUL CHOATE DDS DATA EXTRACTION (916) 654-2160

-----Original Message----- From: Jack Hamilton [mailto:JackHamilton@FIRSTHEALTH.COM] Sent: Thursday, January 08, 2004 10:10 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Working with dates

I'm curious why you code in all upper case. There are advantages to all lower case (easier to type and read) and mixed case (easier to read; can make keywords, and lexemes in variable names, stand out). But what's the advantage of all upper case?

-- JackHamilton@FirstHealth.com Manager, Technical Development Metrics Department, First Health West Sacramento, California USA

>>> "Greg Woolridge" <greg.woolridge@TAP.COM> 01/08/2004 6:55 AM >>> Here is one untested solution.

DATA NEW; SET OLD; BY PT BEGIN; RETAIN FLAG; IF FIRST.PT THEN FLAG=0; IF FLAG=1 THEN DELETE; IF END='300CT2003'D THEN FLAG=1; DROP FLAG; RUN;

Greg M. Woolridge Manager, Study Programming TAP Pharmaceutical Products Inc. e-mail: greg.woolridge@tap.com phone: 847-582-2332 fax: 847-582-2403

Jennifer R Popovic To: SAS-L@LISTSERV.UGA.EDU <PopovicJ@GAO.GOV cc: > Subject: Working with dates Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.U GA.EDU>

01/08/2004 08:16 AM Please respond to Jennifer R Popovic

I have a dataset of begin and end dates of an event, multiple events per person. I've pasted an example of one person's data below (sorted by begin date). What I need to do for each person is to make the first obs with an END date of 10/30/2003 the last observation for that person. So for the person below, the fifth obs would be the last b/c I'd want to delete the last three obs. I know there must be an easy way to do this, but for some reason can't seem to make it work. Any suggestions?

obs begin end 1 04/24/2001 04/28/2001 2 09/09/2001 12/19/2001 3 02/18/2002 03/29/2002 4 04/23/2002 04/27/2002 5 10/10/2002 10/30/2003 6 01/08/2003 01/09/2003 7 02/25/2003 10/30/2003 8 07/14/2003 10/30/2003

Thanks, Jen


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