LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 26 Aug 2003 08:28:33 -0700
Reply-To:     "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:      Re: Question about sort..
Comments: To: Nagakumar Sridhar <nsridhar@ATHEROGENICS.COM>
Content-Type: text/plain

Kumar -

I'd guess it's the leading bytes of your Quest field that are getting you into trouble. Probably embedded blanks or tabs.

Something like this could strip off leading non-numerics:

Drop Okay; Okay='n'; Do until (Okay='y'); If '0' le substr(Quest,1,1) le '9' then Okay='y'; Else Quest=substr(Quest,2); End;

Note if you have more than 9 questions then they all need to be two digits to sort correctly ... 01, 02, 03, ... 10, 11, 12 ... 99


Paul Choate DDS Data Extraction (916) 654-2160

-----Original Message----- From: Nagakumar Sridhar [mailto:nsridhar@ATHEROGENICS.COM] Sent: Tuesday, August 26, 2003 7:30 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Question about sort..


I am trying to do a listing. In the dataset is a field called quest which has various questions. Each question starts with a number ("1. Did ...?" ,"2. Is the patient.." and so on.) Everytime I run the report, all the 1's (question 1's) get bunched up at the bottom of the report. The remaining questions are listed in order. Any ideas on how to straighten this out would be greatly appreciated..

Thanks and regards

Kumar Sridhar

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