Date: Tue, 6 Aug 1996 13:01:18 EST
Reply-To: George Sharrard <george.sharrard@CCMAIL.NYNEXMOBILE.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: George Sharrard <george.sharrard@CCMAIL.NYNEXMOBILE.COM>
Subject: Re: how to use last.var
If your records are "date stamped" when they are created - sort by
student ID and date stamp. Then:
data new ;
set student ;
by ID ;
if last.id ;
If there is no date stamp on the record then you have to ASSUME that
they are entered so that the most current record always appears last.
Sort by ID and do the data step above. (This of course will be very
bad if someone has sorted the file on anything but student ID)
______________________________ Reply Separator _________________________________
Subject: how to use last.var
Author: Philip M Linerode <linerode@TENET.EDU> at internet
Date: 8/6/96 1:01 PM
Hey you guys!
I have a number of student records. If a student moved during the year,
the student is listed a second time. How do I get a set with the only
or the last one of the id by-variable?
I know nodupkey keeps the first.
San Antonio, TX