BookmarkSubscribeRSS Feed
hernan7800
Fluorite | Level 6

Hi, does anybody know how to sort a hash table?

Thanks!

1 REPLY 1
slchen
Lapis Lazuli | Level 10
data _null_;
   if _n_=1 then do;
     if 0 then set sashelp.class;
     declare hash h(dataset:'sashelp.class',ordered:'y',multidata:'y');
	 h.definekey('weight');
	 h.definedata(all:'y');
	 h.definedone();
   end;
   rc=h.output(dataset:'want');
run;

AI Navigator GIF.gif


Navigate AI governance with SAS tools for compliance and ethical AI practices. Try SAS Ai Navigator for free for the first six months.

Check it out on Microsoft Marketplace →

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 2254 views
  • 0 likes
  • 2 in conversation