<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sorting data Alternative methods in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802612#M315978</link>
    <description>&lt;P&gt;If you have big table, try this one .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data F M;
set sashelp.class;
select(sex);
when('F') output F;
when('M') output M;
otherwise;
end;
run;

data sort;
 set F M;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 17 Mar 2022 12:06:34 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2022-03-17T12:06:34Z</dc:date>
    <item>
      <title>Sorting data Alternative methods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802574#M315953</link>
      <description>&lt;P&gt;Hi Good Morning&lt;/P&gt;
&lt;P&gt;Any alternative methods are there sorting the data along with below methods&lt;/P&gt;
&lt;P&gt;1.Proc sort&lt;/P&gt;
&lt;P&gt;2.Hast Object&lt;/P&gt;
&lt;P&gt;3.Proc Sql&amp;nbsp; ; Order by Clause&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sort;
set sashelp.class;
run;


data _null_;
set sort;
sort_data=cats(('Proc sort data=sort;by sex; run;'));
call execute(sort_data);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Mar 2022 06:16:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802574#M315953</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2022-03-17T06:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data Alternative methods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802579#M315957</link>
      <description>&lt;P&gt;Statistical procedures like FREQ or MEANS will sort their outputs, REPORT will sort the result along the variables defined as GROUP.&lt;/P&gt;
&lt;P&gt;There's lots of places in SAS where sorting takes place, but for sorting whole datasets, you've listed the tools to use.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 07:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802579#M315957</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-17T07:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data Alternative methods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802584#M315961</link>
      <description>&lt;P&gt;proc freq&amp;nbsp; and proc means and reports how to&amp;nbsp; sort&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 08:31:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802584#M315961</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2022-03-17T08:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data Alternative methods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802589#M315965</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265860"&gt;@BrahmanandaRao&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;proc freq&amp;nbsp; and proc means and reports how to&amp;nbsp; sort&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As I said, they automatically sort the&amp;nbsp;&lt;EM&gt;results&lt;/EM&gt;, not datasets. Just play around with them.&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 08:49:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802589#M315965</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-17T08:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data Alternative methods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802599#M315970</link>
      <description>&lt;P&gt;You could use an index&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc copy in=sashelp out=work memtype=data;
   select class;
run;
 
proc datasets library=work nolist;
   modify class;
      index delete _all_;
      index create name;
run;quit;
 
data SortIndex;
   set class;
   by name;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Mar 2022 09:47:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802599#M315970</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-03-17T09:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data Alternative methods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802612#M315978</link>
      <description>&lt;P&gt;If you have big table, try this one .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data F M;
set sashelp.class;
select(sex);
when('F') output F;
when('M') output M;
otherwise;
end;
run;

data sort;
 set F M;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Mar 2022 12:06:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802612#M315978</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-03-17T12:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data Alternative methods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802617#M315981</link>
      <description>Hi Sharp&lt;BR /&gt;Than you for your smart solution&lt;BR /&gt;Suppose we have have sort thru diferrent N no of  customer ID s then how can we do this method&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Mar 2022 12:24:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802617#M315981</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2022-03-17T12:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data Alternative methods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802619#M315983</link>
      <description>&lt;P&gt;Supply usable example data, so we can show you.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 12:31:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802619#M315983</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-17T12:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data Alternative methods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802620#M315984</link>
      <description>&lt;P&gt;But note that &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;'s method is only feasible for variables with low cardinality. If you try that with a million distinct customers, you will run out of file handles for the datasets.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 12:36:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802620#M315984</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-17T12:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data Alternative methods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802621#M315985</link>
      <description>&lt;P&gt;Here we have a situation that is quite common in the forums, where the focus is so tightly on the mechanics of performing a task (in this case sorting), that we don't understand the bigger problem. This is the &lt;A href="https://xyproblem.info/" target="_self"&gt;XY problem&lt;/A&gt;&amp;nbsp;and leads to inefficient dialog and sub-optimal solutions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The larger problem that has led to this emphasis on sorting is never explained, and so we are just shooting in the dark to propose solutions. Perhaps&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265860"&gt;@BrahmanandaRao&lt;/a&gt;&amp;nbsp;could explain the problem which leads to this interest in sorting methods, and perhaps then the best solution will be obvious, and we won't waste our time proposing or discussing solutions that aren't helpful in this case.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 12:41:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802621#M315985</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-17T12:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data Alternative methods</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802622#M315986</link>
      <description>Yes. As Kurt pointed out. Show us some sample data .</description>
      <pubDate>Thu, 17 Mar 2022 12:45:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data-Alternative-methods/m-p/802622#M315986</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-03-17T12:45:14Z</dc:date>
    </item>
  </channel>
</rss>

