Date: Thu, 6 Sep 2001 00:57:28 -0700
Reply-To: Wei-heng Lin <cycuwlin@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Wei-heng Lin <cycuwlin@HOTMAIL.COM>
Organization: http://groups.google.com/
Subject: Re: Subsetting data by usig FIRST.xx,
I cann't sort xx by DESCENDING?
Content-Type: text/plain; charset=ISO-8859-1
c-Jeff.Voeller@wcom.com (Jeff Voeller) wrote in message news:<002301c1365c$ccc6b430$e9fd25a6@mcit.com>...
> On Wednesday, September 5, 2001 at 3:29 PM, Qiang Ling wrote:
>
> > ERROR: BY variables are not properly sorted on data set WORK.GRE.
> >
> > After I changed to sort by using BY WORD, it works file.
> >
> > I got confused.
>
> Your BY statements need to be identical in the SORT and DATA steps. In this
> case, if you just use BY DESCENDING WORD in your DATA step, you'll be fine.
I will use:
proc sort; by word;
data gre2; set gre; by word; if last.word;
run;
Wei-heng Lin
Department of Accounting
CYCU, Taoyuan, Taiwan
|