<?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 temp file in sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/temp-file-in-sas/m-p/683898#M207184</link>
    <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class="" title=""&gt;I have sas 9.4 installed on drive C and all data on drive F. How to make sas not create temporary files on drive C only on F. Drive F is much faster.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class="" title=""&gt;Best regards and thank you in advance for your help.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Sep 2020 09:17:01 GMT</pubDate>
    <dc:creator>makset</dc:creator>
    <dc:date>2020-09-15T09:17:01Z</dc:date>
    <item>
      <title>temp file in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/temp-file-in-sas/m-p/683898#M207184</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class="" title=""&gt;I have sas 9.4 installed on drive C and all data on drive F. How to make sas not create temporary files on drive C only on F. Drive F is much faster.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class="" title=""&gt;Best regards and thank you in advance for your help.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 09:17:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/temp-file-in-sas/m-p/683898#M207184</guid>
      <dc:creator>makset</dc:creator>
      <dc:date>2020-09-15T09:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: temp file in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/temp-file-in-sas/m-p/683923#M207194</link>
      <description>libname x v9 'F:\temp';&lt;BR /&gt;options user=x ;&lt;BR /&gt;&lt;BR /&gt;But this code only work for temp dataset ,not util dataset generated by stat proc like PROC GLM</description>
      <pubDate>Tue, 15 Sep 2020 11:21:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/temp-file-in-sas/m-p/683923#M207194</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-09-15T11:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: temp file in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/temp-file-in-sas/m-p/683929#M207197</link>
      <description>&lt;P&gt;Change the location of the WORK libref.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The location of the WORK libref is specified in the standard installation location&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;"C:\Program Files\SASHome\SASFoundation\9.4\nls\en\sasv9.cfg"&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;in line line&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;-WORK "!TEMP\SAS Temporary Files"&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;You can specify your own folder by a couple of ways&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;edit your system wide default config.sas&lt;/LI&gt;
&lt;LI&gt;create a custom config.sas in your userhome or startup folder&lt;/LI&gt;
&lt;LI&gt;specify a custom config.sas in the SAS startup command&lt;/LI&gt;
&lt;LI&gt;change the environment variable TEMP in the SAS startup command
&lt;UL&gt;
&lt;LI&gt;change is specific to only the SAS session process started&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;Change TEMP&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SAS icon on my desktop taskbar has property &lt;STRONG&gt;target&amp;nbsp;&lt;/STRONG&gt;as the command&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -CONFIG "C:\Program Files\SASHome\SASFoundation\9.4\nls\en\sasv9.cfg"&lt;/PRE&gt;
&lt;P&gt;Edit the target so that the environment variable TEMP is changed for the SAS session that is launched.&lt;/P&gt;
&lt;PRE&gt;"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -CONFIG "C:\Program Files\SASHome\SASFoundation\9.4\nls\en\sasv9.cfg" -set TEMP D:\TEMP&lt;/PRE&gt;
&lt;P&gt;Starting SAS from the icon will now have a different folder for WORK&lt;/P&gt;
&lt;PRE&gt;2    libname WORK list;
NOTE: Libref=   WORK
      Scope=    Kernel
      Engine=   V9
      Access=   TEMP
      Physical Name= D:\TEMP\SAS Temporary Files\_TD3944_HELIUM_
      Filename= D:\TEMP\SAS Temporary Files\_TD3944_HELIUM_&lt;BR /&gt;...&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are presuming WORK means the default library when only the member name is coded (one-level SAS data set name), then you can use the USER option to specify which library to use in such cases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;libname FASTER 'F:\TEMP';
options USER=FASTER;

data class;
  set sashelp.class;
run;&lt;/PRE&gt;
&lt;PRE&gt;----- LOG -----&lt;BR /&gt;5 options USER=FASTER;
6
7 data class;                                               &amp;lt;------------- one-level name
8 set sashelp.class;
9 run;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set FASTER.CLASS has 19 observations and 5 variables.     &amp;lt;---- USER= adjusted one-level name
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Sep 2020 13:59:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/temp-file-in-sas/m-p/683929#M207197</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2020-09-15T13:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: temp file in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/temp-file-in-sas/m-p/684040#M207245</link>
      <description>&lt;P&gt;All of the advice that you have received so far is good advice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sometimes, however, depending on your company's policies, certain things like editing config files aren't always possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One other option is to run your program in "batch" mode (instead of interactive).&amp;nbsp; The command varies by environment (Windows, Unix, Mainframe, etc.).&amp;nbsp; Here's an example from Windows where I've created a little .bat file which, when double-clicked, launches my SAS job in batch mode with all the parameters that I have specified:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;set env=production
::set env=development

sas -set environment %env% -set lPwd_PASSWORD XXXXXXXX -memsize 32G -work N:\Work -logparm "rollover=session write=immediate" -log C:\Users\XXXXXXXX\Documents\SAS\Pgm\Test\Hive_Grid\logs\Join_Members-tblMMR0323_Restated_MONO_#Y-#m-#d_#H-#M-#s_#p.log -sysin C:\Users\XXXXXXXX\Documents\SAS\Pgm\Test\Hive_Grid\Join_Members-tblMMR0323_Restated_MONO.sas -nostatuswin -noterminal -nosplash -noicon
pause&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Some of the parameters I'm using in the above example:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Work.&amp;nbsp; I'm assigning Work to a drive that, in this case, has more space because I have some big files to work with.&lt;/LI&gt;
&lt;LI&gt;Memsize:&amp;nbsp; Again, I'm using big files, so I'm increasing my memory allocation.&lt;/LI&gt;
&lt;LI&gt;Logparm:&amp;nbsp; I'm using "immediate" which means that the log is written too as soon as SAS has log output.&amp;nbsp; Otherwise SAS will buffer the writing to the log.&amp;nbsp; When buffered, you can lose part of the log if the job crashes, and, if you have long running steps, it can take forever for enough log data to get into the buffer to the point where SAS actually writes it to the log.&amp;nbsp; Caution:&amp;nbsp; "Immediate" is less efficient.&amp;nbsp; "Immediate" is a great option for debugging, but once a job is stable, "Buffered" is typically going to give best performance.&lt;/LI&gt;
&lt;LI&gt;Log:&amp;nbsp; I'm using a series of log directives which tell SAS how to dynamically name the log file.&amp;nbsp; Here, I'm adding a system generated data time stamp and the Process ID to the name of the log file.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;You don't have to code all of these parameters, Logparm for example is not essential; this is just an example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All that to say, sometimes it's better to submit via batch when you need to have a little more control over parameters that must be set at start up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 19:31:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/temp-file-in-sas/m-p/684040#M207245</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-09-15T19:31:38Z</dc:date>
    </item>
  </channel>
</rss>

