<?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: Need help to sort data in best possible way in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877715#M346733</link>
    <description>I think you need to post your actual code and log please. &lt;BR /&gt;&lt;BR /&gt;Any chance you're running out of space? If you're sorting a large file, you usually need 3x that file size available for  sort.</description>
    <pubDate>Fri, 26 May 2023 15:26:18 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2023-05-26T15:26:18Z</dc:date>
    <item>
      <title>Need help to sort data in best possible way</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877564#M346673</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting error in a particular proc sql step where "örder by " "is used, but I am getting sort execution error where order by is used&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I got few other alternatives to sort but all of these taking same execution time&lt;/P&gt;
&lt;P&gt;&lt;A href="https://sasnrd.com/sas-three-alternatives-proc-sort/" target="_blank"&gt;Three Alternatives To PROC SORT In SAS - SASnrd&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone tell which one is best to use of&amp;nbsp;"ERROR: Sort execution failure" error .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!!&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 17:18:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877564#M346673</guid>
      <dc:creator>Aexor</dc:creator>
      <dc:date>2023-05-25T17:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to sort data in best possible way</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877566#M346674</link>
      <description>&lt;P&gt;Don't do too much in a single PROC SQL step; if removing the ORDER BY clause fixes your ERROR, add a follow-up PROC SORT step to get the required order.&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 17:24:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877566#M346674</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-05-25T17:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to sort data in best possible way</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877577#M346679</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/327170"&gt;@Aexor&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would help more if you could provide additional context.&lt;/P&gt;
&lt;P&gt;- Where you data originated from&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Database ----&amp;gt; Use Proc SQL Explicit Pass-through&amp;nbsp; to make the Database perform the sort for you.&lt;/LI&gt;
&lt;LI&gt;Flat File(s) ----&amp;gt; Some Operating system have built-in sort commands, you can use those command to sort the data before reading into SAS.&lt;/LI&gt;
&lt;LI&gt;SAS data set ----&amp;gt; SAS Settings (-sortsize &lt;STRONG&gt;x&lt;/STRONG&gt;G -memsize &lt;STRONG&gt;y&lt;/STRONG&gt;G -cpucount &lt;STRONG&gt;z&lt;/STRONG&gt; -utilloc /? ) and File-system&amp;nbsp; I/O throughput will play major role in performance&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;- Size of your data file in GB rather than record count&lt;/P&gt;
&lt;P&gt;- Compressed/Uncompressed status&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a paper that might of interest to &lt;A title="Solving SAS® Performance Problems: Our Methodology" href="https://support.sas.com/resources/papers/proceedings19/3490-2019.pdf" target="_blank" rel="noopener"&gt;Solving SAS® Performance Problems: Our Methodology&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 18:39:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877577#M346679</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2023-05-25T18:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to sort data in best possible way</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877712#M346732</link>
      <description>I have added a PROC SORT previous to the step, but I am getting &lt;BR /&gt;ERROR: An I/O error has occurred on file WORK.&amp;lt;file name&amp;gt;</description>
      <pubDate>Fri, 26 May 2023 15:18:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877712#M346732</guid>
      <dc:creator>Aexor</dc:creator>
      <dc:date>2023-05-26T15:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to sort data in best possible way</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877715#M346733</link>
      <description>I think you need to post your actual code and log please. &lt;BR /&gt;&lt;BR /&gt;Any chance you're running out of space? If you're sorting a large file, you usually need 3x that file size available for  sort.</description>
      <pubDate>Fri, 26 May 2023 15:26:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877715#M346733</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-05-26T15:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to sort data in best possible way</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877743#M346742</link>
      <description>&lt;P&gt;So the final sort seems to overflow your WORK, which also explains the failure of your SQL.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Try the TAGSORT option in PROC SORT (especially if you have the COMPRESS system option set)&lt;/LI&gt;
&lt;LI&gt;Clean up your WORK as much as possible before running the sort&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Also post your code and log, so we can see what really happens. Post the&amp;nbsp;&lt;EM&gt;complete&lt;/EM&gt; log(all code and messages).&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 17:38:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877743#M346742</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-05-26T17:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to sort data in best possible way</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877818#M346790</link>
      <description>&lt;P&gt;This I/O error message normally occurs if you run out of available disk space.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both Proc Sort and a SQL Order By use UTILLOC - which often is the same location as WORK.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WORK and UTILLOC are both locations on disk under paths created by SAS for the duration of a SAS Session.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can free-up disk space by deleting tables in WORK that you don't need anymore.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're running things on a local SAS installation on your laptop then you might just need to clean-up so you've got more free disk space.&lt;/P&gt;
&lt;P&gt;If you're running SAS on a server then normally there is sufficient disk space available for WORK unless it's an undersized environment. If running on a server then I'd also verify that your SQL is doing what it should and that you are not having some many:many Cartesian join that creates a huge data volume.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 May 2023 01:46:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-sort-data-in-best-possible-way/m-p/877818#M346790</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-05-27T01:46:59Z</dc:date>
    </item>
  </channel>
</rss>

