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 (June 2009, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 9 Jun 2009 09:56:11 +0800
Reply-To:     shao xiaolong <sxlion2@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         shao xiaolong <sxlion2@GMAIL.COM>
Subject:      Re: First and Last Observation
In-Reply-To:  <200906082336.n58NVfiK003158@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1

I don't think you can avoid the second sort.

the fellowing only reduce a data step,

proc sort data =have ; by ID1 Date time ID2 ID3 ; run; proc sort data =have ; by ID1 Date ID2 ID3 ; run;

data last ; set have; by ID1 date ID2 ID3 ; FO = first.ID3 ; LO = last.ID3 ; run;


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