<?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: Libname assignment in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Libname-assignment/m-p/599053#M172847</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/112460"&gt;@gphunt&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, this is possible by using parentheses around the second libref:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname yyy (xxx);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Edit: This is explained under "Form 4" in the documentation of the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lestmtsglobal&amp;amp;docsetTarget=n1nk65k2vsfmxfn1wu17fntzszbp.htm&amp;amp;locale=de" target="_blank" rel="noopener"&gt;LIBNAME statement&lt;/A&gt; and mostly used for concatenating two or more libraries.)&lt;/P&gt;</description>
    <pubDate>Thu, 24 Oct 2019 14:50:38 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2019-10-24T14:50:38Z</dc:date>
    <item>
      <title>Libname assignment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-assignment/m-p/599048#M172845</link>
      <description>&lt;P&gt;Is it possible to assign one libref to another without specifying the path twice?&amp;nbsp; For example, something like:&lt;/P&gt;&lt;P&gt;libname xxx 'C:\folder_a';&lt;/P&gt;&lt;P&gt;libname yyy xxx;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;instead of:&lt;/P&gt;&lt;P&gt;libname xxx 'C:\folder_a';&lt;/P&gt;&lt;P&gt;libname yyy 'C:\folder_a';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would be very helpful for alot of situations in EG as well as modifying older programs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 14:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-assignment/m-p/599048#M172845</guid>
      <dc:creator>gphunt</dc:creator>
      <dc:date>2019-10-24T14:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Libname assignment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-assignment/m-p/599053#M172847</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/112460"&gt;@gphunt&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, this is possible by using parentheses around the second libref:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname yyy (xxx);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Edit: This is explained under "Form 4" in the documentation of the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lestmtsglobal&amp;amp;docsetTarget=n1nk65k2vsfmxfn1wu17fntzszbp.htm&amp;amp;locale=de" target="_blank" rel="noopener"&gt;LIBNAME statement&lt;/A&gt; and mostly used for concatenating two or more libraries.)&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 14:50:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-assignment/m-p/599053#M172847</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-10-24T14:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Libname assignment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-assignment/m-p/599060#M172848</link>
      <description>&lt;P&gt;Thanks, ReelanceReinhard!!&amp;nbsp; I've been searching for that for quite awhile.&amp;nbsp; This will be very helpful!&lt;/P&gt;&lt;P&gt;Gary&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 14:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-assignment/m-p/599060#M172848</guid>
      <dc:creator>gphunt</dc:creator>
      <dc:date>2019-10-24T14:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Libname assignment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-assignment/m-p/599062#M172849</link>
      <description>&lt;P&gt;Thank you for sharing. Learned something new today. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 14:57:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-assignment/m-p/599062#M172849</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-10-24T14:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Libname assignment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-assignment/m-p/599080#M172862</link>
      <description>&lt;P&gt;Another possibility is to use the PATHNAME() function to find out where the other libref is pointing.&lt;/P&gt;
&lt;P&gt;This probably will only work for simple examples where the first libref is pointing to physical folder(s).&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xxx 'C:\folder_a';
libname yyy "%sysfunc(pathname(xxx))";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also watch out as the format of the result is different depending on how the original libname statement was constructed. When ( ) are used in the original then do not add the quotes around the returned value.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xxx ('C:\folder_a' 'C:\folder_b');
libname yyy %sysfunc(pathname(xxx));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Oct 2019 15:46:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-assignment/m-p/599080#M172862</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-10-24T15:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Libname assignment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-assignment/m-p/599081#M172863</link>
      <description>Another great idea! Thanks, Tom.&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Oct 2019 15:50:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-assignment/m-p/599081#M172863</guid>
      <dc:creator>gphunt</dc:creator>
      <dc:date>2019-10-24T15:50:19Z</dc:date>
    </item>
  </channel>
</rss>

