<?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 with/without quotes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Libname-with-without-quotes/m-p/500998#M133514</link>
    <description>&lt;P&gt;Simple answer:&lt;/P&gt;
&lt;P&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macroname"&gt;%let&lt;/SPAN&gt; x&lt;SPAN class="token operator"&gt;="&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;path&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;on&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;unix&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;server&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;directory"&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More complex and but much more flexible answer as you can tweak &lt;EM&gt;ad infinitum&lt;/EM&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname %sysfunc(ifc(%index(%superq(x),DB2),%superq(x),"&amp;amp;x")) ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Oct 2018 23:02:08 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2018-10-03T23:02:08Z</dc:date>
    <item>
      <title>Libname with/without quotes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-with-without-quotes/m-p/500971#M133497</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a single libname statement that works for my database(via authdomain) and also on my unix server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;This works:
%let x=DB2 dsn="ABCDEF" authdomain='abc_d_efg' schema="nameofschema";

libname input &amp;amp;x.; /* No quotes*/

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I can also have:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let x=/path/on/unix/server/directory;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The above libname(WITHOUT) quotes will not work.&lt;/P&gt;&lt;P&gt;For this i will have to ADD the quotes.&lt;/P&gt;&lt;P&gt;This will work for second example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname input "&amp;amp;x.";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I need help with handling quotes.&lt;/P&gt;&lt;P&gt;Please advise, in what way i should code this. So that a single libname works for both.&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Oct 2018 21:20:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-with-without-quotes/m-p/500971#M133497</guid>
      <dc:creator>david27</dc:creator>
      <dc:date>2018-10-02T21:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Libname with/without quotes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-with-without-quotes/m-p/500998#M133514</link>
      <description>&lt;P&gt;Simple answer:&lt;/P&gt;
&lt;P&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macroname"&gt;%let&lt;/SPAN&gt; x&lt;SPAN class="token operator"&gt;="&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;path&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;on&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;unix&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;server&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;directory"&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More complex and but much more flexible answer as you can tweak &lt;EM&gt;ad infinitum&lt;/EM&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname %sysfunc(ifc(%index(%superq(x),DB2),%superq(x),"&amp;amp;x")) ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 23:02:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-with-without-quotes/m-p/500998#M133514</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-10-03T23:02:08Z</dc:date>
    </item>
  </channel>
</rss>

