Date: Sat, 16 Aug 2008 15:32:01 +0000
Reply-To: iw1junk@COMCAST.NET
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ian Whitlock <iw1junk@COMCAST.NET>
Subject: Re: Plz help me in this
Chittiprolu,
You asked, "Can any one tell me how can i sort the dataset in datastep."
In SAS one usually sorts a SAS dataset with PROC SORT. Hence your
request is rather unusual and deserves some explanation.
What kind of dataset do you want to sort? How large is it? Why do
you want to use DATA step code to do this?
I suspect you really have no need to sort data in a DATA step.
However, the DATA step language is rich enough to produce sorting
algorithms. Do you know any? On the other hand, you might short
circuit a trip into sorting algorithms via has tables.
Using http://www.lexjansen.com/nesug/ I searched for "hash sort" and
found two good entries:
http://www.nesug.info/proceedings/nesug07/ff/ff03.pdf and
http://www.nesug.info/proceedings/nesug06/ap/ap11.pdf
Using http://www.lexjansen.com/sugi/ produced 45 entries for
consideration.
In the future you might try getting a better subject line. Perhaps
something as simple as "sort data in data step?" would have been
more appropriate than "Plz help me in this"
Ian Whitlock