<?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: SAS Libref in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Libref/m-p/699898#M214118</link>
    <description>&lt;P&gt;I'm assuming this is on Windows and it is documented here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#usedatalibs.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#usedatalibs.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's an environment variable&amp;nbsp;&lt;BR /&gt;In the screen shot below, you can see the libref temp is assigned to c:\users\snzroo\appdata\local\temp and to the right you can see the command prompt window where I echoed the TEMP environment variable.&lt;BR /&gt;&lt;BR /&gt;&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="AMSAS_0-1605719544912.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51797i846F211D6B5D3B87/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AMSAS_0-1605719544912.png" alt="AMSAS_0-1605719544912.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2020 17:13:52 GMT</pubDate>
    <dc:creator>AMSAS</dc:creator>
    <dc:date>2020-11-18T17:13:52Z</dc:date>
    <item>
      <title>SAS Libref</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Libref/m-p/699833#M214092</link>
      <description>&lt;P&gt;when I submit the following data step&lt;/P&gt;&lt;P&gt;data temp.testdata;&lt;/P&gt;&lt;P&gt;fname="abc";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;SAS automatically assigns a permanent libref by the name of temp pointing to "C:\Users\nnnn\AppData\Local\Temp". However this if I give any other libref that was not previously assigned with libname statement, it gives an error "libref not assigned"&lt;/P&gt;&lt;P&gt;Please help me to understand this&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 15:33:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Libref/m-p/699833#M214092</guid>
      <dc:creator>JNC</dc:creator>
      <dc:date>2020-11-18T15:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Libref</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Libref/m-p/699898#M214118</link>
      <description>&lt;P&gt;I'm assuming this is on Windows and it is documented here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#usedatalibs.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#usedatalibs.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's an environment variable&amp;nbsp;&lt;BR /&gt;In the screen shot below, you can see the libref temp is assigned to c:\users\snzroo\appdata\local\temp and to the right you can see the command prompt window where I echoed the TEMP environment variable.&lt;BR /&gt;&lt;BR /&gt;&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="AMSAS_0-1605719544912.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51797i846F211D6B5D3B87/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AMSAS_0-1605719544912.png" alt="AMSAS_0-1605719544912.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 17:13:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Libref/m-p/699898#M214118</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2020-11-18T17:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Libref</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Libref/m-p/699934#M214137</link>
      <description>&lt;P&gt;Its a throw back to SAS's mainframe roots.&amp;nbsp; In JCL you used a DD card to map DDNAME to a physical file.&amp;nbsp; &amp;nbsp;SAS would use the DDNAME as the LIBREF ref.&lt;/P&gt;
&lt;PRE&gt;//MYLIB DD DSN=.......
//SYSIN DD *
data mylib.testdata; fname='abc'; run;
/*&lt;/PRE&gt;
&lt;P&gt;So when they rolled out SAS for other operating systems they decided that if you had an environment variable defined with the name you are using as a LIBREF in your code (but you hadn't define a libref yet) then the value of that environment variable would be used as path for the library.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 18:27:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Libref/m-p/699934#M214137</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-11-18T18:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Libref</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Libref/m-p/700208#M214274</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/226241"&gt;@AMSAS&lt;/a&gt;&amp;nbsp; &amp;nbsp;for the quick reply. This helps to understand clearly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;JNC&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 14:35:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Libref/m-p/700208#M214274</guid>
      <dc:creator>JNC</dc:creator>
      <dc:date>2020-11-19T14:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Libref</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Libref/m-p/700252#M214286</link>
      <description>&lt;P&gt;To reinforce an answer from yesterday, SAS is able to use TEMP as a default/pre-defined LIBREF due to the fact that with most installs of Windows, TEMP is defined as a Windows environment variable.&amp;nbsp; One way to view all of the environment variables that are defined in Windows is to bring up your Windows control panel and then choose System, then Advanced System Settings, and then click the Advanced tab.&amp;nbsp; In this window, click the button titled "Environment Variables" and then take a look at the environment variables defined under "User Variables".&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For most users, TEMP points to the following Windows directory:&lt;/P&gt;
&lt;P&gt;C:\Users\userid\AppData\Local\Temp&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even though this appears to be a temporary location, note that any files and data sets written to TEMP by SAS will not be deleted from disk upon SAS termination.&amp;nbsp; This is different than using the default SAS WORK location (where files and data sets written to work are deleted from disk upon normal SAS termination).&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 16:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Libref/m-p/700252#M214286</guid>
      <dc:creator>MartinMincey</dc:creator>
      <dc:date>2020-11-19T16:21:39Z</dc:date>
    </item>
  </channel>
</rss>

