<?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: proc sort in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-sort-default-output-data-set/m-p/803280#M316295</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In answer to your question, yes the sorted data set would also be called apple.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to create a new sorted data set and leave the input data set unchanged then the solution posted by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265860"&gt;@BrahmanandaRao&lt;/a&gt;&amp;nbsp;should be fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more information on the proc sort syntax you can see the&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p02bhn81rn4u64n1b6l00ftdnxge.htm" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Mar 2022 09:46:03 GMT</pubDate>
    <dc:creator>Amir</dc:creator>
    <dc:date>2022-03-22T09:46:03Z</dc:date>
    <item>
      <title>proc sort default output data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sort-default-output-data-set/m-p/803278#M316293</link>
      <description>&lt;PRE&gt;proc sort data=apple;
by colour weight;
run;
&lt;/PRE&gt;
&lt;P&gt;for proc sort, input data is dataset apple, is the output data set after sorting is also apple?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 10:17:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sort-default-output-data-set/m-p/803278#M316293</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-03-22T10:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sort-default-output-data-set/m-p/803279#M316294</link>
      <description>Proc sort data = apple out=sort_apple;&lt;BR /&gt;By variable;&lt;BR /&gt;run;</description>
      <pubDate>Tue, 22 Mar 2022 09:14:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sort-default-output-data-set/m-p/803279#M316294</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2022-03-22T09:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sort-default-output-data-set/m-p/803280#M316295</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In answer to your question, yes the sorted data set would also be called apple.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to create a new sorted data set and leave the input data set unchanged then the solution posted by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265860"&gt;@BrahmanandaRao&lt;/a&gt;&amp;nbsp;should be fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more information on the proc sort syntax you can see the&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p02bhn81rn4u64n1b6l00ftdnxge.htm" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 09:46:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sort-default-output-data-set/m-p/803280#M316295</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2022-03-22T09:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sort-default-output-data-set/m-p/803282#M316297</link>
      <description>&lt;P&gt;How about reading the documentation at &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/p0ha9ymifyaqldn14m2xlqw252wa.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/p0ha9ymifyaqldn14m2xlqw252wa.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;which clearly states&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;In the following example, the original data set was in alphabetical order by last name. PROC SORT replaces the original data set with a data set that is sorted by employee identification number. The following log shows the results from running this PROC SORT step. &lt;A tabindex="0" href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/p0ha9ymifyaqldn14m2xlqw252wa.htm#p0eop3kac0706ln1gtxdevp2o9ka" target="_blank"&gt;Observations Sorted by the Values of One Variable&lt;/A&gt; shows the results of the PROC PRINT step. The statements that produce the output follow:&lt;/P&gt;
&lt;DIV id="p16x7kgvtlx2w8n1xrtsrfmbk3qe" class="xisDoc-codeBlock"&gt;
&lt;DIV class="xisDoc-codeBlockCode"&gt;
&lt;DIV class="CopyCode_copyCode__2RUVr"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="p16x7kgvtlx2w8n1xrtsrfmbk3qe" class="xisDoc-codeBlock"&gt;
&lt;DIV class="xisDoc-codeBlockCode"&gt;
&lt;DIV class="CopyCode_copyCode__2RUVr"&gt;&lt;TEXTAREA class="CopyCode_text__3Nacj" tabindex="-1" aria-hidden="true"&gt;proc sort data=employee;
   by idnumber;
run;

proc print data=employee;
run;&lt;/TEXTAREA&gt;
&lt;DIV class="CopyCode_content__3D03n"&gt;
&lt;PRE class="xisDoc-code  language-sas"&gt;&lt;CODE&gt;proc sort data=employee;
   by idnumber;
run;

proc print data=employee;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="n173l4vdsu7ikbn1arj86u8orrp4" class="xisDoc-logBlock"&gt;
&lt;H3 class="xisDoc-title"&gt;You can provide another data set as an OUT= option, as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265860"&gt;@BrahmanandaRao&lt;/a&gt; shows, if you want to create a different data set which is highly recommended if you use any of the options that remove observations.&lt;/H3&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Mar 2022 09:48:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sort-default-output-data-set/m-p/803282#M316297</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-03-22T09:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: proc sort default output data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sort-default-output-data-set/m-p/803303#M316305</link>
      <description>&lt;P&gt;Maxim 2: &lt;STRONG&gt;Read the Log&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;It will tell you the answer right there on the spot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BIG hint: reading the log is always quicker than posting here. Only when you have trouble interpreting the log, come here for guidance.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 11:57:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sort-default-output-data-set/m-p/803303#M316305</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-22T11:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: proc sort default output data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sort-default-output-data-set/m-p/803496#M316380</link>
      <description>&lt;P&gt;thanks for your&amp;nbsp; hint, you are so right&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 03:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sort-default-output-data-set/m-p/803496#M316380</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-03-23T03:49:04Z</dc:date>
    </item>
  </channel>
</rss>

