<?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: 'Error: Sort execution failure. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-Sort-execution-failure/m-p/693478#M211452</link>
    <description>You need &lt;BR /&gt;INNER JOIN&lt;BR /&gt;or &lt;BR /&gt;LEFT JOIN&lt;BR /&gt;&lt;BR /&gt;not simple a JOIN</description>
    <pubDate>Thu, 22 Oct 2020 12:26:03 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2020-10-22T12:26:03Z</dc:date>
    <item>
      <title>'Error: Sort execution failure.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Sort-execution-failure/m-p/693413#M211417</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running code as&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC SQL;
	CREATE TABLE want.C  AS
	SELECT DISTINCT
	*
	FROM
	have.A as A
	JOIN have.B AS B ON A.family_id=B.family_id
	;
QUIT;&lt;/PRE&gt;&lt;P&gt;But the result show as 'Error: Sort execution failure.' I check online and reason may be the lack of space. Do you have any method to increase the space?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 07:53:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Sort-execution-failure/m-p/693413#M211417</guid>
      <dc:creator>Alexxxxxxx</dc:creator>
      <dc:date>2020-10-22T07:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: 'Error: Sort execution failure.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Sort-execution-failure/m-p/693417#M211421</link>
      <description>&lt;P&gt;First of all, Maxim 3: Know Your Data&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;observation sizes&lt;/LI&gt;
&lt;LI&gt;observation numbers&lt;/LI&gt;
&lt;LI&gt;repeats of BY values&lt;/LI&gt;
&lt;LI&gt;compressed or not&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Next, make sure you have cleaned up your WORK location before running such steps. Depending on the relationship between the tables, PROC SORTs and a data step MERGE may be more efficient.&lt;/P&gt;
&lt;P&gt;And always consider: is that DISTINCT in your SELECT necessary? It forces a sort of the join result on ALL variables.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 08:00:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Sort-execution-failure/m-p/693417#M211421</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-22T08:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: 'Error: Sort execution failure.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Sort-execution-failure/m-p/693428#M211428</link>
      <description>&lt;P&gt;Many thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the have.A has 78344558&amp;nbsp;rows,&amp;nbsp; and 5 columns; have.B has 8266191&amp;nbsp;rows and 3 columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not understand the meaning of&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;repeats of BY values&lt;/LI&gt;&lt;LI&gt;compressed or not&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;1)Could you please explain it to me please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as you said in the previous post, the sort and merge is not suitable for my current work.&lt;/P&gt;&lt;P&gt;I will not use DISTINCT, many thanks for your remind.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)I have clean all file in WORK library. is it the correct method to&amp;nbsp;&lt;SPAN&gt;cleaned up my WORK location?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) is there any method to increase my space?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 08:21:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Sort-execution-failure/m-p/693428#M211428</guid>
      <dc:creator>Alexxxxxxx</dc:creator>
      <dc:date>2020-10-22T08:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: 'Error: Sort execution failure.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Sort-execution-failure/m-p/693432#M211432</link>
      <description>&lt;P&gt;I did not say that SORT and MERGE is not suitable, I said that the MERGE cannot mimic the "cartesian join" done by SQL when there is a many-to-many relationship.&lt;/P&gt;
&lt;P&gt;If you do a data step MERGE under this condition, you will get a NOTE in the log about "repeats of by values in multiple datasets". If you do not get that NOTE, all is well.&lt;/P&gt;
&lt;P&gt;You can check the uniqueness (or lack thereof) by doing&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort
  data=source (keep=key)
  out=test
  nodupkey
;
by key;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;on your datasets before the join, where key is the variable you will join by. You can then see in the log if duplicates were deleted.&lt;/P&gt;
&lt;P&gt;This is one of the steps of Maxim 3.&lt;/P&gt;
&lt;P&gt;You can see if a dataset was compressed by running PROC CONTENTS on it (once again, Maxim 3) and studying the output. This will also give you information about variable lengths and the resulting observation size(s). All this information is pertinent for deciding which methods should be applied to do your join.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can increase your WORK space is dependent on how your SAS is set up. With a local installation (everything on your desktop), adding a second disk (SSD preferred) for WORK and adapting the SAS configuration file(s) would be a feasible way.&lt;/P&gt;
&lt;P&gt;If it is a client/server environment, you need to get in contact with your SAS administrator. I can tell you that any diligent SAS admin will first check if your code is good in terms of efficiency (I always do that) before dishing out more disk space.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 08:39:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Sort-execution-failure/m-p/693432#M211432</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-22T08:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: 'Error: Sort execution failure.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Sort-execution-failure/m-p/693478#M211452</link>
      <description>You need &lt;BR /&gt;INNER JOIN&lt;BR /&gt;or &lt;BR /&gt;LEFT JOIN&lt;BR /&gt;&lt;BR /&gt;not simple a JOIN</description>
      <pubDate>Thu, 22 Oct 2020 12:26:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Sort-execution-failure/m-p/693478#M211452</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-10-22T12:26:03Z</dc:date>
    </item>
  </channel>
</rss>

