<?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 SAS generated LIBREF. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-generated-LIBREF/m-p/580026#M164723</link>
    <description>&lt;P&gt;The following code will generate a LIBREF named as MC0000nn.&amp;nbsp; But I cannot figure out how to know the generated name.&amp;nbsp; The FILENAME function has similar feature that populates the variable with the generated FILEREF.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;6
7    data _null_;
8       length libref $8;
9       libref = ' ';
10      rc = libname(libref,'.');
11      msg = sysmsg();
12      put _all_;
13      run;

libref=  rc=-70004 msg=NOTE: Libref  refers to the same physical library as SASUSER. _ERROR_=0 _N_=1
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SASHELP.VLIBNAM before and after.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Before" style="width: 237px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31606i8FC0A5999604A5E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Before" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Before&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="After" style="width: 223px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31607i2A82291F83818DBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="After" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;After&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Aug 2019 22:59:53 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2019-08-08T22:59:53Z</dc:date>
    <item>
      <title>SAS generated LIBREF.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-generated-LIBREF/m-p/580026#M164723</link>
      <description>&lt;P&gt;The following code will generate a LIBREF named as MC0000nn.&amp;nbsp; But I cannot figure out how to know the generated name.&amp;nbsp; The FILENAME function has similar feature that populates the variable with the generated FILEREF.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;6
7    data _null_;
8       length libref $8;
9       libref = ' ';
10      rc = libname(libref,'.');
11      msg = sysmsg();
12      put _all_;
13      run;

libref=  rc=-70004 msg=NOTE: Libref  refers to the same physical library as SASUSER. _ERROR_=0 _N_=1
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SASHELP.VLIBNAM before and after.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Before" style="width: 237px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31606i8FC0A5999604A5E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Before" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Before&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="After" style="width: 223px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31607i2A82291F83818DBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="After" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;After&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 22:59:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-generated-LIBREF/m-p/580026#M164723</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2019-08-08T22:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS generated LIBREF.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-generated-LIBREF/m-p/580032#M164725</link>
      <description>&lt;P&gt;Not too sure why you'd want to define a nameless library, but you can get the name by defining another library that points to the same location:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  length LIBREF $8;
  LIBREF = ' ';
  RC  = libname(LIBREF,'.');
  RC  = libname(LIBREF,'.');
  MSG = sysmsg();
  put _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;LIBREF= RC=-70004 MSG=NOTE: Libref refers to the same physical library as WC000001. _ERROR_=0 _N_=1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A bit wasteful but better than nothing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 23:26:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-generated-LIBREF/m-p/580032#M164725</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-08-08T23:26:36Z</dc:date>
    </item>
  </channel>
</rss>

