Help using Base SAS procedures

Proc Sort error

Reply
Frequent Contributor
Posts: 97

Proc Sort error

I am trying to run a simple proc sort, and if I add the descending option, it errors:

14 PROC SORT DATA=GOVERNING_CLASS;
15 BY LR descending;
_
22
ERROR 22-322: Syntax error, expecting one of the following: a name, _ALL_, _CHARACTER_, _CHAR_, _NUMERIC_.
16 RUN;
ERROR: Variable NAME not found.


However, this runs fine:

PROC SORT DATA=GOVERNING_CLASS;
BY LR;
RUN;

Any ideas? I am running SAS 9.1, EG 4.1, and just installed the newest hotfix for errors.

Thanks,
Chris
Christopher Johnson
www.codeitmagazine.com
Respected Advisor
Posts: 3,799

Re: Proc Sort error

The keyword DESCENDING goes before the variable that you want to sort descending.
Frequent Contributor
Posts: 97

Re: Proc Sort error

Thanks!!!
Christopher Johnson
www.codeitmagazine.com
Ask a Question
Discussion stats
  • 2 replies
  • 1704 views
  • 2 likes
  • 2 in conversation