<?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: Disk Space Error in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/685072#M20091</link>
    <description>How would the code look if I added in a where statement? I'm not that familiar with proc sql.&lt;BR /&gt;&lt;BR /&gt;I agree 100% with your second point. &lt;BR /&gt;&lt;BR /&gt;I've been using data have; set have; to avoid having to store the massive file that the proc sql creates. It just saves space to store what I want out of the merge, but maybe you are implying this step could be removed by adding in a where clause into the proc sql?</description>
    <pubDate>Fri, 18 Sep 2020 19:35:51 GMT</pubDate>
    <dc:creator>PeterBr</dc:creator>
    <dc:date>2020-09-18T19:35:51Z</dc:date>
    <item>
      <title>Disk Space Error</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/684842#M20075</link>
      <description>&lt;P&gt;Hi All, I'm getting the following error in the screenshot below. I have read that this is because I have low disk space on my desktop and the recommendations seem to be to go and delete everything in the "SAS Temporary Files" folder on the desktop to free up space. I've included screenshots below of what this looks like for me. I store everything I want on an external hard drive and not on my desktop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it okay to go ahead and delete these files on my desktop or will this somehow corrupt my SAS account or link to files on the external hard drive and corrupt them somehow? Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PeterBr_0-1600389618345.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/49524iDB13BE0236A8D611/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PeterBr_0-1600389618345.png" alt="PeterBr_0-1600389618345.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PeterBr_1-1600389726341.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/49525iBD8AD46CC969FCE5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PeterBr_1-1600389726341.png" alt="PeterBr_1-1600389726341.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PeterBr_2-1600389740833.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/49526iAC9C947314563D9D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PeterBr_2-1600389740833.png" alt="PeterBr_2-1600389740833.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 00:45:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/684842#M20075</guid>
      <dc:creator>PeterBr</dc:creator>
      <dc:date>2020-09-18T00:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Disk Space Error</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/684854#M20076</link>
      <description>&lt;P&gt;Please post the whole log of this SQL step, including the code. Use the &amp;lt;/&amp;gt; button to post the log by copy/pasting, do NOT post pictures.&lt;/P&gt;
&lt;P&gt;You have a CPU time of just below 5&amp;nbsp;&lt;EM&gt;minutes&lt;/EM&gt;, but a real time of close to 6&amp;nbsp;&lt;EM&gt;hours&lt;/EM&gt;(!).&lt;/P&gt;
&lt;P&gt;That points to either catastrophically bad usage of SQL, or a similar catastrophic setup of your WORK location.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 02:10:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/684854#M20076</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-09-18T02:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Disk Space Error</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/684925#M20078</link>
      <description>&lt;P&gt;Here is the log and then followed below by the code. I'm working with very large datasets (30GB each) and just trying to merge them based on unique identifiers so I figured that's why it takes a long time to run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Log:&lt;/P&gt;
&lt;PRE&gt;38   libname proclm 'J:\SLAP Demographics\Proc\Claim';
NOTE: Libref PROCLM was successfully assigned as follows:
      Engine:        V9
      Physical Name: J:\SLAP Demographics\Proc\Claim
39   *getting the claim data for the procedures so we have the dates;
40   %macro prmerge(lib1=, lib2=, data1=, data2=);
41   %do i = 15 %to 18;
42
43   proc sql;
44   create table &amp;amp;lib2..&amp;amp;data1._&amp;amp;i._&amp;amp;data2. as
45   select *, (proc_&amp;amp;i._&amp;amp;data2._ids.clm_trans_id = &amp;amp;data1._&amp;amp;i..clm_trans_id)
45 ! as indic,
46           (proc_&amp;amp;i._&amp;amp;data2._ids.clm_trans_id ~='') as FROMproc_ids,
47           (&amp;amp;data1._&amp;amp;i..clm_trans_id ~='') as FROM&amp;amp;data1.
48   from proc.proc_&amp;amp;i._&amp;amp;data2._ids full join &amp;amp;lib1._&amp;amp;i..&amp;amp;data1._&amp;amp;i. on
48 ! proc_&amp;amp;i._&amp;amp;data2._ids.clm_trans_id=&amp;amp;data1._&amp;amp;i..clm_trans_id;
49   quit;
50
51   data &amp;amp;lib2..&amp;amp;data1._&amp;amp;i._&amp;amp;data2.;
52   set &amp;amp;lib2..&amp;amp;data1._&amp;amp;i._&amp;amp;data2.;
53   if FROMproc_ids = 1 and FROM&amp;amp;data1. = 1;
54   run;
55
56   %end;
57   %mend prmerge;
58   %prmerge(lib1=diag, lib2=proclm, data1=claim, data2=out);
WARNING: Variable clm_trans_id already exists on file PROCLM.CLAIM_15_OUT.
NOTE: Table PROCLM.CLAIM_15_OUT created, with 20821258 rows and 105 columns.

NOTE: PROCEDURE SQL used (Total process time):
      real time           2:08:40.25
      cpu time            6:07.13



NOTE: There were 20821258 observations read from the data set
      PROCLM.CLAIM_15_OUT.
NOTE: The data set PROCLM.CLAIM_15_OUT has 3551 observations and 105
      variables.
NOTE: DATA statement used (Total process time):
      real time           21:16.96
      cpu time            40.84 seconds


WARNING: Variable clm_trans_id already exists on file PROCLM.CLAIM_16_OUT.
ERROR: Insufficient space in file WORK.'SASTMP-000000012'n.UTILITY.
ERROR: File WORK.'SASTMP-000000012'n.UTILITY is damaged. I/O processing did
       not complete.
NOTE: Error was encountered during utility-file processing. You may be able
      to execute the SQL statement successfully if you allocate more space to
      the WORK library.
ERROR: There is not enough WORK disk space to store the results of an
       internal sorting phase.
ERROR: An error has occurred.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           6:56:52.95
      cpu time            4:40.64


&lt;/PRE&gt;
&lt;P&gt;Code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
libname proclm 'J:\SLAP Demographics\Proc\Claim';
*getting the claim data for the procedures so we have the dates;
%macro prmerge(lib1=, lib2=, data1=, data2=);
%do i = 15 %to 18;

proc sql;
create table &amp;amp;lib2..&amp;amp;data1._&amp;amp;i._&amp;amp;data2. as
select *, (proc_&amp;amp;i._&amp;amp;data2._ids.clm_trans_id = &amp;amp;data1._&amp;amp;i..clm_trans_id) as indic,
		(proc_&amp;amp;i._&amp;amp;data2._ids.clm_trans_id ~='') as FROMproc_ids,
		(&amp;amp;data1._&amp;amp;i..clm_trans_id ~='') as FROM&amp;amp;data1.
from proc.proc_&amp;amp;i._&amp;amp;data2._ids full join &amp;amp;lib1._&amp;amp;i..&amp;amp;data1._&amp;amp;i. on proc_&amp;amp;i._&amp;amp;data2._ids.clm_trans_id=&amp;amp;data1._&amp;amp;i..clm_trans_id;
quit;

data &amp;amp;lib2..&amp;amp;data1._&amp;amp;i._&amp;amp;data2.;
set &amp;amp;lib2..&amp;amp;data1._&amp;amp;i._&amp;amp;data2.;
if FROMproc_ids = 1 and FROM&amp;amp;data1. = 1;
run;

%end;
%mend prmerge;
%prmerge(lib1=diag, lib2=proclm, data1=claim, data2=out);
&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Sep 2020 10:22:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/684925#M20078</guid>
      <dc:creator>PeterBr</dc:creator>
      <dc:date>2020-09-18T10:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Disk Space Error</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/684934#M20079</link>
      <description>&lt;P&gt;So it looks like you are doing a full join first, only to then select for what would be the result of an inner join.&lt;/P&gt;
&lt;P&gt;What is the relationship of the observations in the tables with regards to the key variable?&lt;/P&gt;
&lt;P&gt;one-to-one, one-to-many, many-to-one or many-to-many?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your disk space problem is the result of building a monster utiliy file for the SQL join; depending on the relationship, you might be able to use a non-SQL method.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 11:13:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/684934#M20079</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-09-18T11:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Disk Space Error</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/684963#M20082</link>
      <description>&lt;P&gt;You are spot on, I'm merging and then only selecting the data that had id matches with the first dataset. It's a one-to-many merge.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only ways I know how to merge are either proc sort -&amp;gt; data merge and the proc sql method (which seems to be faster and stronger than data merge since no sorting has to be done).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there are no other solutions from a code perspective, should I clear out the work folder or is that not recommended?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code seemed to be working fine for a few months for other projects (albeit slow like you pointed out, which is okay with me as long as it works) but this error has just recently popped up.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 13:11:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/684963#M20082</guid>
      <dc:creator>PeterBr</dc:creator>
      <dc:date>2020-09-18T13:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Disk Space Error</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/684970#M20083</link>
      <description>&lt;P&gt;The fact that you don't see an explicit sort does not mean that SQL won't have to do it. In fact it has been my experience over the years that a separate sort and following data step MERGE outperforms SQL, some times by&amp;nbsp;&lt;EM&gt;several&lt;/EM&gt;&amp;nbsp;orders of magnitude.&lt;/P&gt;
&lt;P&gt;So try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort
  data=proc.proc_&amp;amp;i._&amp;amp;data2._ids
  out=data2
;
by clm_trans_id;
run;

proc sort
  data=&amp;amp;lib1._&amp;amp;i..&amp;amp;data1._&amp;amp;i.
  out=data1
;
by clm_trans_id;
run;

data &amp;amp;lib2..&amp;amp;data1._&amp;amp;i._&amp;amp;data2.;
merge
  data2 (in=in2)
  data1 (in=in1)
;
by clm_trans_id;
if in1 and in2;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Sep 2020 13:52:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/684970#M20083</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-09-18T13:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Disk Space Error</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/685048#M20089</link>
      <description>&lt;P&gt;Silly question:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have this data step&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;data &amp;amp;lib2..&amp;amp;data1._&amp;amp;i._&amp;amp;data2.;
set &amp;amp;lib2..&amp;amp;data1._&amp;amp;i._&amp;amp;data2.;
if FROMproc_ids = 1 and FROM&amp;amp;data1. = 1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to subset data. Why don't you include this as a WHERE clause in selecting data in the Proc SQL?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you want to be very careful of habitual use of the&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;programming structure. Since the result completely replaces the data source you may find that you have issues if more complex program logic doesn't quite do what you want. With run times as long as this I suspect you may not want to rerun code to rebuild the input set very often.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 17:36:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/685048#M20089</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-09-18T17:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Disk Space Error</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/685072#M20091</link>
      <description>How would the code look if I added in a where statement? I'm not that familiar with proc sql.&lt;BR /&gt;&lt;BR /&gt;I agree 100% with your second point. &lt;BR /&gt;&lt;BR /&gt;I've been using data have; set have; to avoid having to store the massive file that the proc sql creates. It just saves space to store what I want out of the merge, but maybe you are implying this step could be removed by adding in a where clause into the proc sql?</description>
      <pubDate>Fri, 18 Sep 2020 19:35:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/685072#M20091</guid>
      <dc:creator>PeterBr</dc:creator>
      <dc:date>2020-09-18T19:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Disk Space Error</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/685157#M20092</link>
      <description>&lt;P&gt;Consider creating indexes on the source table variables used in the ON clause. This way SQL could optimize the join and not need as much utility storage to complete.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;- Jan.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Sep 2020 07:57:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/685157#M20092</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2020-09-19T07:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Disk Space Error</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/685191#M20094</link>
      <description>11</description>
      <pubDate>Sat, 19 Sep 2020 14:45:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Disk-Space-Error/m-p/685191#M20094</guid>
      <dc:creator>aser123</dc:creator>
      <dc:date>2020-09-19T14:45:49Z</dc:date>
    </item>
  </channel>
</rss>

