<?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: Insufficient space in file WORK in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430397#M68603</link>
    <description>&lt;P&gt;I'm trying to submit the following query. I have also tried other queries and still get the same error. yes, WORK is located on my C: drive, but I have plenty of space there (more than 200 GB). one of my tables have 900000 observations and&amp;nbsp;is 1.2 GB.The other one has&amp;nbsp;600000 observations and&amp;nbsp; 412MG. the tables include personal information bout customers.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;outobs&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;create&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; CPI.combined &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;as&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;select&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;distinct&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;a.ACCTNUM,&lt;/P&gt;&lt;P&gt;a.CUST_ID,&lt;/P&gt;&lt;P&gt;b.SourceACCT,&lt;/P&gt;&lt;P&gt;b.CUST_ID&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; CPI.CUST_profile_info a,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;CPI.CUST_DEC_PRO b&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; a.CUST_ID ^= b.CUST_ID;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jan 2018 13:10:12 GMT</pubDate>
    <dc:creator>parmis</dc:creator>
    <dc:date>2018-01-24T13:10:12Z</dc:date>
    <item>
      <title>ERROR: Insufficient space in file WORK</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430159#M68592</link>
      <description>&lt;P&gt;I'm running a very simple inner join query in SAS , and it gives me the "insufficient space in work.SASTMP" error. My work directory is empty, and I'm not even using it. All my SAS data sets are in my C drive which has more than 200G&amp;nbsp; space.&lt;/P&gt;&lt;P&gt;Can anyone help me with that? Again my libraries are in my C drive.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 20:33:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430159#M68592</guid>
      <dc:creator>parmis</dc:creator>
      <dc:date>2018-01-23T20:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient space in file WORK</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430165#M68593</link>
      <description>&lt;P&gt;Even a slight mistake can cause SQL to run out of space, so we need to see the code. It's also important to know the data, so a quick overview (number of observations &amp;amp; variables, observation size) of the datasets will be helpful. That&amp;nbsp;&lt;EM&gt;you&lt;/EM&gt; do not use WORK does not mean much, as proc sql builds its utility file(s) there, and that seems to be the problem. Is WORK also located on the C: drive?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 20:43:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430165#M68593</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-23T20:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient space in file WORK</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430166#M68594</link>
      <description>&lt;P&gt;Are you using SAS UE?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 20:48:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430166#M68594</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-23T20:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient space in file WORK</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430397#M68603</link>
      <description>&lt;P&gt;I'm trying to submit the following query. I have also tried other queries and still get the same error. yes, WORK is located on my C: drive, but I have plenty of space there (more than 200 GB). one of my tables have 900000 observations and&amp;nbsp;is 1.2 GB.The other one has&amp;nbsp;600000 observations and&amp;nbsp; 412MG. the tables include personal information bout customers.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;outobs&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;create&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; CPI.combined &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;as&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;select&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;distinct&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;a.ACCTNUM,&lt;/P&gt;&lt;P&gt;a.CUST_ID,&lt;/P&gt;&lt;P&gt;b.SourceACCT,&lt;/P&gt;&lt;P&gt;b.CUST_ID&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; CPI.CUST_profile_info a,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;CPI.CUST_DEC_PRO b&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; a.CUST_ID ^= b.CUST_ID;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 13:10:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430397#M68603</guid>
      <dc:creator>parmis</dc:creator>
      <dc:date>2018-01-24T13:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient space in file WORK</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430398#M68604</link>
      <description>&lt;P&gt;No, I'm using SAS PC&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 13:07:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430398#M68604</guid>
      <dc:creator>parmis</dc:creator>
      <dc:date>2018-01-24T13:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient space in file WORK</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430404#M68607</link>
      <description>&lt;P&gt;No miracle you run out of space:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql outobs=10;
create table CPI.combined as
select distinct
 a.ACCTNUM,
a.CUST_ID,
b.SourceACCT,
b.CUST_ID
from CPI.CUST_profile_info a,
CPI.CUST_DEC_PRO b
where a.CUST_ID ^= b.CUST_ID;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This means that every observation in cust_profile is joined with ALL observations of cust_dec_pro that have a different cust_id.&lt;/P&gt;
&lt;P&gt;If the datasets have distinct cust_id's, you end up with 900000 * 599999 observations (539,999,100,000)&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 13:18:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430404#M68607</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-24T13:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient space in file WORK</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430409#M68608</link>
      <description>&lt;P&gt;PS do you want to find matches or non-matches on a join by cust_id?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 13:25:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430409#M68608</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-24T13:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient space in file WORK</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430424#M68609</link>
      <description>&lt;P&gt;Yes, this is exactly what I'm trying to do. I was using the inner join first then I changed it to where statement.&lt;/P&gt;&lt;P&gt;I have also tried to submit the following query just to see if it works, but I still get the same error message after an hour.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;outobs&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;create&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; CPI.test &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;as&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;select&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;distinct&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;a.CUST_ID,&lt;/P&gt;&lt;P&gt;a.ACCTNUM&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; CPI.CUST_INFO;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 13:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430424#M68609</guid>
      <dc:creator>parmis</dc:creator>
      <dc:date>2018-01-24T13:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient space in file WORK</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430427#M68611</link>
      <description>&lt;P&gt;SQL is notoriously bad when it has to do sorting on big tables.&lt;/P&gt;
&lt;P&gt;Use this instead:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort
  data=cpi.cust_info (keep=cust_id acctnum)
  out=cpi.test
  nodupkey
;
by cust_id acctnum;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want to discover cust_id's in one dataset that are not present in the other, use a data step merge.&lt;/P&gt;
&lt;P&gt;If you need to find matching cust_id's with differences in other variables, it can also be achieved in a data step merge.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 13:57:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430427#M68611</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-24T13:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient space in file WORK</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430552#M68621</link>
      <description>&lt;P&gt;Thank you so much, it works.&lt;/P&gt;&lt;P&gt;you're the best &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 17:26:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Insufficient-space-in-file-WORK/m-p/430552#M68621</guid>
      <dc:creator>parmis</dc:creator>
      <dc:date>2018-01-24T17:26:10Z</dc:date>
    </item>
  </channel>
</rss>

