LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (October 2005, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 19 Oct 2005 15:17:51 -0400
Reply-To:     Ya Huang <ya.huang@AMYLIN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ya Huang <ya.huang@AMYLIN.COM>
Subject:      Re: advanced proc sort
Comments: To: Df Ss <tggsun@YAHOO.COM>

Not sure if I understand your question correctly, the following may give you some hint:

data xx; do a='A','B','C','+','-','_','a','b','c'; output; end; run;

proc format; value $afmt '+'='z3' '-'='z2' '_'='z1' ;

data xx; set xx; fa=put(a,$afmt.); run;

proc sort; by fa; run;

proc print; run;

Obs a fa

1 A A 2 B B 3 C C 4 a a 5 b b 6 c c 7 _ z1 8 - z2 9 + z3

Kind regards,

Ya Huang

On Wed, 19 Oct 2005 11:46:30 -0700, df ss <tggsun@YAHOO.COM> wrote:

>Hello, >I have a field TEST. In the field, they are classifies >A, B, C, +, -, _, a, b and c. I want using proc sort >to sort A, B, C, a, b by ascending order; and want to >sort +, - and _ by descending order in same time. Is >there a way to do that? >Thanks > > > > >__________________________________ >Yahoo! Music Unlimited >Access over 1 million songs. Try it free. >http://music.yahoo.com/unlimited/


Back to: Top of message | Previous page | Main SAS-L page