can we do sort operations with out using sort procedure.Is there any another concept.
Thanks in advance
regards
rawindarreddy
How about SQL or Hash Table ?
proc sql;
create table want as
select * from sashelp.class
order by name;
quit;
Ksharp
How about SQL or Hash Table ?
proc sql;
create table want as
select * from sashelp.class
order by name;
quit;
Ksharp
Following Ksharp's suggestion, an example of hash() solution on sorting:
data have;
input a;
cards;
10
1
3
2
5
7
4
3
;
data _null_;
if _n_=1 then do;
set have (obs=1);
dcl hash h(dataset: 'have',ordered:'a', multidata: 'yes');
h.definekey('a');
h.definedata('a');
h.definedone();
end;
h.output(dataset:'want');
run;
proc print;run;
thanks Haikuo but i dont know Hash concept can you help me to understand what is hash
Do a googling on 'SAS Hash', you will find tons of sugi papers on this topic, that is at least how I started. Plus SAS online documentation and practice, you will have a taste of it before you know it.
Regards,
Haikuo
thanks ksharp i know about this iam looking for sas/base concept.Can you help me how could we do that using hash table and what is a hash concept
Another possibility is to have the PROC SORT procedure use another sort tool. A lot of mainframe shops do that with SyncSort.
For some actities, you can use PROC FORMAT to accomplish the goal of a SORT.
Note that all of these procedures may give you different results when there are ties on the sort keys.
This paper may be helpful
http://support.sas.com/resources/papers/proceedings10/140-2010.pdf
Doc Muhlbaier
Duke
If you don't need all of the data , depending on your needs several procs such as FREQ, MEANS or SUMMARY using class variables, and TABULATE will produce sorted output and output datasets.
Proc sql, Hash method, proc format are some of various ways
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.