<?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 Is there a way to print the libname var in the log? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-print-the-libname-var-in-the-log/m-p/952333#M42807</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the PUT can print a data variable and its value to the log and the %PUT can do the same for Macro variables. Is there a way to do this for libname vars?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, if I have a libname defined as the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname x "%SYSGET(dir)";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the above code is written as:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let x = %sysget(dir);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I can get the value of x by using %PUT x; What can I do if %LET is replaced with LIBNAME? I know in a SAS log, it'll print out the definition of a libname defined in the program. I guess my question is, if you can print a Macro variable or a SAS data step variable, can you do something similar for a libname var?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 02 Dec 2024 21:23:22 GMT</pubDate>
    <dc:creator>cosmid</dc:creator>
    <dc:date>2024-12-02T21:23:22Z</dc:date>
    <item>
      <title>Is there a way to print the libname var in the log?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-print-the-libname-var-in-the-log/m-p/952333#M42807</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the PUT can print a data variable and its value to the log and the %PUT can do the same for Macro variables. Is there a way to do this for libname vars?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, if I have a libname defined as the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname x "%SYSGET(dir)";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the above code is written as:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let x = %sysget(dir);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I can get the value of x by using %PUT x; What can I do if %LET is replaced with LIBNAME? I know in a SAS log, it'll print out the definition of a libname defined in the program. I guess my question is, if you can print a Macro variable or a SAS data step variable, can you do something similar for a libname var?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 21:23:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-print-the-libname-var-in-the-log/m-p/952333#M42807</guid>
      <dc:creator>cosmid</dc:creator>
      <dc:date>2024-12-02T21:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to print the libname var in the log?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-print-the-libname-var-in-the-log/m-p/952334#M42808</link>
      <description>&lt;P&gt;A libref is not a variable.&lt;/P&gt;
&lt;P&gt;But the LIBNAME statement does have an option for displaying information about an existing libref.&lt;/P&gt;
&lt;P&gt;Try :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname x list;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you only want the path that the libref points to use the PATHNAME() function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put Path for libref X is %qsysfunc(pathname(X,L));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 21:38:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-print-the-libname-var-in-the-log/m-p/952334#M42808</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-12-02T21:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to print the libname var in the log?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-print-the-libname-var-in-the-log/m-p/952353#M42809</link>
      <description>&lt;P&gt;There are no libname variables. LIBNAME is a statement, and it creates a&amp;nbsp;&lt;EM&gt;library reference&lt;/EM&gt;. The attributes of a library reference can be displayed with the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/lestmtsglobal/n1nk65k2vsfmxfn1wu17fntzszbp.htm#p0h1tncn98tixqn1c8qat32kt0n3" target="_blank" rel="noopener"&gt;LIST&lt;/A&gt; option of the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/lestmtsglobal/n1nk65k2vsfmxfn1wu17fntzszbp.htm" target="_blank" rel="noopener"&gt;LIBNAME&lt;/A&gt; statement.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 23:30:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-way-to-print-the-libname-var-in-the-log/m-p/952353#M42809</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-12-02T23:30:58Z</dc:date>
    </item>
  </channel>
</rss>

