<?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: What is the use Equals option in proc Sort? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84527#M18205</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Patrick and Yaswanthj for your replies. &lt;/P&gt;&lt;P&gt;Patrick, I applied proc sort on famous SASHELP.CLASS with equals and noequals options respectively as you suggested. When I compared the results , I didnt find any difference.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sort data=sashelp.class out=emp1 nodupkey equals;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;by sex;&lt;/STRONG&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sort data=sashelp.class out=emp2 nodupkey noequals;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;by sex;&lt;/STRONG&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me out .&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;John&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Apr 2012 04:29:08 GMT</pubDate>
    <dc:creator>john83</dc:creator>
    <dc:date>2012-04-17T04:29:08Z</dc:date>
    <item>
      <title>What is the use Equals option in proc Sort?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84524#M18202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anybody please tell me the use of Equals options in the proc sort procedure? &lt;/P&gt;&lt;P&gt;General Form of Proc sort equals option:&lt;/P&gt;&lt;P&gt;Proc sort data=datasetname nodupkey equals;&lt;/P&gt;&lt;P&gt;by variablename;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;John &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2012 10:29:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84524#M18202</guid>
      <dc:creator>john83</dc:creator>
      <dc:date>2012-04-16T10:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: What is the use Equals option in proc Sort?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84525#M18203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the SAS documentation:&lt;/P&gt;&lt;P&gt;"For observations with identical BY-variable values, EQUALS maintains the relative order of the observations within the input data set in the output data set."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So let's say you sort the famous sashelp.class table by sex: There will be multiple observations for 'M' and multiple observations for 'F'. With EQUALS the order within the 'F' group and the 'M' group will be the same like in sashelp.class, with NOEQUALS the order can be different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My assumption is (I don't know for sure) that using NOEQUALS allows SAS to use a more efficient sort algorithm, so I usally use this option value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2012 10:43:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84525#M18203</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-04-16T10:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: What is the use Equals option in proc Sort?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84526#M18204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #f5f5f5;"&gt;When you use NODUPRECS or NODUPKEY to remove observations in the output data set, the choice of EQUALS or NOEQUALS can affect which observations are removed.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2012 15:31:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84526#M18204</guid>
      <dc:creator>yaswanthj</dc:creator>
      <dc:date>2012-04-16T15:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: What is the use Equals option in proc Sort?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84527#M18205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Patrick and Yaswanthj for your replies. &lt;/P&gt;&lt;P&gt;Patrick, I applied proc sort on famous SASHELP.CLASS with equals and noequals options respectively as you suggested. When I compared the results , I didnt find any difference.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sort data=sashelp.class out=emp1 nodupkey equals;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;by sex;&lt;/STRONG&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sort data=sashelp.class out=emp2 nodupkey noequals;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;by sex;&lt;/STRONG&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me out .&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;John&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 04:29:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84527#M18205</guid>
      <dc:creator>john83</dc:creator>
      <dc:date>2012-04-17T04:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: What is the use Equals option in proc Sort?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84528#M18206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then your famous sashelp.class must have been sorted before. The following is the difference under mine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://communities.sas.com/legacyfs/online/1674_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 07:08:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84528#M18206</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-04-17T07:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: What is the use Equals option in proc Sort?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84529#M18207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ksharp. Now I understood the difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 12:00:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84529#M18207</guid>
      <dc:creator>john83</dc:creator>
      <dc:date>2012-04-17T12:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: What is the use Equals option in proc Sort?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84530#M18208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I can confirm Patrick's comments on the efficiency. I have read some help doc a while ago (can't find the link right now) which basically addressed that if using NOEQUALS , SAS will save some effort of putting the equals back to their original order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 15:03:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-Equals-option-in-proc-Sort/m-p/84530#M18208</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-04-17T15:03:18Z</dc:date>
    </item>
  </channel>
</rss>

