<?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 Unknown default SAS Directory in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Unknown-default-SAS-Directory/m-p/233401#M42608</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using SAS 9.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Location of my default temporary ‘work’ library&lt;/P&gt;&lt;P&gt;&lt;EM&gt;%put %sysfunc(getoption(work));&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;C:\Users\user1\AppData\Local\Temp\SAS Temporary Files\_TD6864_UPLCI087142_&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I run the following code&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; temp.set1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set1=&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then find location of this ‘TEMP’ library using the following command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;%put %sysfunc(pathname(temp));&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;C:\Users\user1\AppData\Local\Temp&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question: &lt;SPAN&gt;I am not&amp;nbsp;sure that an automatic libname “temp” exists in SAS. And data stored here are permanent. I could not find this in any SAS documentation.&amp;nbsp; Can you please explain.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Nov 2015 10:10:01 GMT</pubDate>
    <dc:creator>Das123</dc:creator>
    <dc:date>2015-11-06T10:10:01Z</dc:date>
    <item>
      <title>Unknown default SAS Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unknown-default-SAS-Directory/m-p/233401#M42608</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using SAS 9.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Location of my default temporary ‘work’ library&lt;/P&gt;&lt;P&gt;&lt;EM&gt;%put %sysfunc(getoption(work));&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;C:\Users\user1\AppData\Local\Temp\SAS Temporary Files\_TD6864_UPLCI087142_&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I run the following code&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; temp.set1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set1=&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then find location of this ‘TEMP’ library using the following command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;%put %sysfunc(pathname(temp));&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;C:\Users\user1\AppData\Local\Temp&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question: &lt;SPAN&gt;I am not&amp;nbsp;sure that an automatic libname “temp” exists in SAS. And data stored here are permanent. I could not find this in any SAS documentation.&amp;nbsp; Can you please explain.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2015 10:10:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unknown-default-SAS-Directory/m-p/233401#M42608</guid>
      <dc:creator>Das123</dc:creator>
      <dc:date>2015-11-06T10:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Unknown default SAS Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unknown-default-SAS-Directory/m-p/233412#M42616</link>
      <description>&lt;P&gt;No, there is no libname called temp in the default SAS install. &amp;nbsp;Work is the temporary folder. &amp;nbsp;The idea is that in your programs - (or if you work on a project or server environment these might be setup for you) - create the references which you use to store you data, work is removed at the end of the session:&lt;/P&gt;
&lt;P&gt;libname yourlib "path-to-folder";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So path-to-folder is a folder on your local machine, or network where to store data permanently.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2015 11:53:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unknown-default-SAS-Directory/m-p/233412#M42616</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-11-06T11:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Unknown default SAS Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unknown-default-SAS-Directory/m-p/233422#M42621</link>
      <description>&lt;P&gt;Thank you for posting this interesting question. Searching for the answer I discovered&amp;nbsp;this page of the online help (for SAS under Windows):&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/usedatalibs.htm#useenvvar" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/usedatalibs.htm#useenvvar&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Quote:&lt;/P&gt;
&lt;P&gt;---------------------&lt;/P&gt;
&lt;P&gt;When you use a libref in a SAS statement, SAS resolves libref assignments in this order:&lt;/P&gt;
&lt;OL start="1" type="1"&gt;
&lt;LI&gt;
&lt;P&gt;a libref assigned by a LIBNAME statement, a LIBNAME function, or by using the New Library dialog box, with the last assignment taking precedence&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;a libref assigned by a SAS environment variable&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;a libref assigned by a Windows environment variable.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;---------------------&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In your case I guess that a Windows environment variable TEMP exists (this is the case on my computer, too) and points to the path you've mentioned.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can quickly list the Windows environment variables and their values in the SAS log by submitting the following code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename ttt pipe 'set';
data _null_;
infile ttt lrecl=5000;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;A list of the SAS environment variables (see item 2 above) and their values can be obtained as follows:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %sysfunc(getoption(set));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2015 13:34:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unknown-default-SAS-Directory/m-p/233422#M42621</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2015-11-06T13:34:24Z</dc:date>
    </item>
  </channel>
</rss>

