Date: Sun, 16 Sep 2007 20:44:10 -0700
Reply-To: RAMS <ramsathish@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: RAMS <ramsathish@GMAIL.COM>
Organization: http://groups.google.com
Subject: Proc sort
Content-Type: text/plain; charset="iso-8859-1"
Dear All,
I have a Lab data of 45 subjects, subjects sample were
analysed two or more times but for analysis i have to take the maximum
value of each subject. So i used PROC SORT technique to discard the
duplicate values. I used this technique twice. Is there any optimum
way to do this. I attached my sample data and the code.
data lab;
input sno visit value;
cards;
101 1 175
101 1 145
101 1 225
101 1 200
102 1 345
102 1 375
102 1 380
103 1 300
103 1 325
104 1 245
104 1 200
;
proc sort data = lab nodupkey;
by sno descending value;
run;
proc sort data = lab nodupkey;
by sno;
run;
|