Date: Tue, 8 Feb 2000 14:03:59 -0600
Reply-To: "Muzny, Robert V." <MUZNRV@INTEGRIS-HEALTH.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Muzny, Robert V." <MUZNRV@INTEGRIS-HEALTH.COM>
Subject: Re: Record Selection
Content-Type: text/plain; charset="iso-8859-1"
How about this (untested)
data a;
retain grd1;
set yourdata;
by name;
if first.name then grd1=grd;
if last.name then
if grd1=grd then output;
run;
Data set a should contain only records where the first grade in the sequence
is equal to the last grade in the sequence.
RVM
original text:
Date: Tue, 8 Feb 2000 08:35:18 PST
From: George Smith <anirdesh@HOTMAIL.COM>
Subject: Record Selection
I HAVE RECORDS AS FOLLOWS :
NAME EDTE GRD
ABC 890123 04
ABC 900413 05
ABC 970624 06
ABC 991213 04
XYZ 910123 07
XYZ 940413 08
XYZ 980624 08
XYZ 991101 11
OPQ 870130 06
OPQ 980130 06
OPQ 000123 06
I WANT TO FIND OUT HOW MANY PERSONS ARE THERE IN A DATABASE, WHO HAVE SAME
GRADE
IN THE BEGINING AND AT THE LAST.
( IN THIS CASE PERSON ABC AND OPQ HAVE SAME GRADE; 04 AND 06 RESPECTIVELY,
E-RESPECTIVE OF EDATE)