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 (August 1996, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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

Phil:

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 ; run ;

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)

george

______________________________ 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.

TIA,

Phil Linerode Northside ISD San Antonio, TX


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