| Date: | Fri, 17 Nov 2000 12:50:50 -0500 |
| Reply-To: | Nathaniel_Wooding@DOM.COM |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Nat Wooding <Nathaniel_Wooding@DOM.COM> |
| Subject: | Re: retrieving records |
|
| Content-type: | text/plain; charset=us-ascii |
|---|
Xihu
Try the following
Nat Wooding
data a;
input
id t1 t2 t3;
if (max(of t1-t3)=98 )
and (min(of t1-t3)=98 ) then hit=1;
cards;
1 23 42 15
1 98 98 98
2 30 21 45
2 34 33 45
2 98 98 98
3 98 98 98
3 98 98 98
4 98 98 98
4 98 98 98
proc sort; by id hit;
data b;set a;
by id ;
if first.id then do;
keeper=hit; * if the first occurance of the id has a hit=0, then keeper=0 and
the obs are deleted;
end;
if keeper;
retain keeper;
proc print;run;
|