<?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 8.2: How to put library properties into (macro) variable(s) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-8-2-How-to-put-library-properties-into-macro-variable-s/m-p/158264#M30890</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, a couple of workarounds perhaps:&lt;/P&gt;&lt;P&gt;- Get the pathname of a library.&lt;/P&gt;&lt;P&gt;%put %sysfunc(pathname(work));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Check access to a library&lt;/P&gt;&lt;P&gt;libname rob "S:\Temp\Rob" access=read;&lt;/P&gt;&lt;P&gt;data rob.test;&lt;/P&gt;&lt;P&gt;&amp;nbsp; attrib a format=1.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; a=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%put %sysfunc(fileexist(rob.test));&lt;/P&gt;&lt;P&gt;- File will not exist as write protected (make sure to delete your temp ds if it is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Still thinking about engine (haven't got 8.2 so can't try things).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Mar 2014 11:28:51 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2014-03-27T11:28:51Z</dc:date>
    <item>
      <title>SAS 8.2: How to put library properties into (macro) variable(s)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-8-2-How-to-put-library-properties-into-macro-variable-s/m-p/158263#M30889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to automatically check properties (paths, engine, access (readonly or not)) of all libraries in a session. In SAS 9.2 these are conveniently stored in sashelp.vlibnam. In SAS 8.2 I only found the libname function (which gives only the path), and that the properties can be displayed in the log window with statement &lt;SPAN style="font-family: courier new,courier;"&gt;libname &amp;lt;libref&amp;gt; list;&lt;/SPAN&gt; Is there any possibility to get the output of this statement into a variable or macro variable? Or is there any other way to get this information?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 10:08:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-8-2-How-to-put-library-properties-into-macro-variable-s/m-p/158263#M30889</guid>
      <dc:creator>AnjaF</dc:creator>
      <dc:date>2014-03-27T10:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 8.2: How to put library properties into (macro) variable(s)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-8-2-How-to-put-library-properties-into-macro-variable-s/m-p/158264#M30890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, a couple of workarounds perhaps:&lt;/P&gt;&lt;P&gt;- Get the pathname of a library.&lt;/P&gt;&lt;P&gt;%put %sysfunc(pathname(work));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Check access to a library&lt;/P&gt;&lt;P&gt;libname rob "S:\Temp\Rob" access=read;&lt;/P&gt;&lt;P&gt;data rob.test;&lt;/P&gt;&lt;P&gt;&amp;nbsp; attrib a format=1.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; a=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%put %sysfunc(fileexist(rob.test));&lt;/P&gt;&lt;P&gt;- File will not exist as write protected (make sure to delete your temp ds if it is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Still thinking about engine (haven't got 8.2 so can't try things).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 11:28:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-8-2-How-to-put-library-properties-into-macro-variable-s/m-p/158264#M30890</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-03-27T11:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 8.2: How to put library properties into (macro) variable(s)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-8-2-How-to-put-library-properties-into-macro-variable-s/m-p/158265#M30891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the dictionary tables with proc sql and into:&amp;nbsp; to put them in macro vars.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi30/070-30.pdf" title="http://www2.sas.com/proceedings/sugi30/070-30.pdf"&gt;http://www2.sas.com/proceedings/sugi30/070-30.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 16:00:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-8-2-How-to-put-library-properties-into-macro-variable-s/m-p/158265#M30891</guid>
      <dc:creator>Patrick_Tan</dc:creator>
      <dc:date>2014-03-27T16:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 8.2: How to put library properties into (macro) variable(s)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-8-2-How-to-put-library-properties-into-macro-variable-s/m-p/158266#M30892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your replies. Unfortunately, the dictionary tables in SAS 8.2 do not contain suitable libname information except the pathname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found another solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; ods listing close;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; ods output Contents.Directory(match_all=DIRECTORIES) = &amp;lt;libname&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; proc contents data = &amp;lt;libname&amp;gt;._all_ nods;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; ods listing;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The resulting dataset work.&amp;lt;libname&amp;gt; contains the information that you would get in the log file with &lt;SPAN style="font-family: 'courier new', courier;"&gt;libname &amp;lt;libname&amp;gt; list;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In case there is more than one level, detailed information is put into &amp;lt;libname&amp;gt;1, &amp;lt;libname&amp;gt;2, etc., while &amp;lt;libname&amp;gt; only contains information about the number of levels.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 10:17:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-8-2-How-to-put-library-properties-into-macro-variable-s/m-p/158266#M30892</guid>
      <dc:creator>AnjaF</dc:creator>
      <dc:date>2014-03-28T10:17:08Z</dc:date>
    </item>
  </channel>
</rss>

