<?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: To read directory from file reference in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/To-read-directory-from-file-reference/m-p/137761#M261287</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You seem to have mixed macro and data step logic there.&lt;/P&gt;&lt;P&gt;In a data step you can call the PATHNAME() function directly.&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; path = pathname('sashelp');&lt;/P&gt;&lt;P&gt;&amp;nbsp; put path=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In macro code you can call the PATHNAME() function using %SYSFUNC().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put path=%sysfunc(pathname(sashelp));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Mar 2014 13:02:57 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2014-03-10T13:02:57Z</dc:date>
    <item>
      <title>To read directory from file reference</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-read-directory-from-file-reference/m-p/137759#M261285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is there is any way to read directory path from the file reference?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for e.g. I had file references declared in one stage of a program as: filename fref &amp;lt;dir&amp;gt;;&lt;/P&gt;&lt;P&gt;In other place I want to get the directory path &amp;lt;dir&amp;gt; only by using fref.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how this can be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your help is much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Sudharsanan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 07:16:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-read-directory-from-file-reference/m-p/137759#M261285</guid>
      <dc:creator>sudharsanan</dc:creator>
      <dc:date>2014-03-10T07:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: To read directory from file reference</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-read-directory-from-file-reference/m-p/137760#M261286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You want:&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put %sysfunc(pathname( **your file refence** ));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the %sysfunc(pathname()) will return the address.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 11:11:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-read-directory-from-file-reference/m-p/137760#M261286</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-03-10T11:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: To read directory from file reference</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-read-directory-from-file-reference/m-p/137761#M261287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You seem to have mixed macro and data step logic there.&lt;/P&gt;&lt;P&gt;In a data step you can call the PATHNAME() function directly.&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; path = pathname('sashelp');&lt;/P&gt;&lt;P&gt;&amp;nbsp; put path=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In macro code you can call the PATHNAME() function using %SYSFUNC().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put path=%sysfunc(pathname(sashelp));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 13:02:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-read-directory-from-file-reference/m-p/137761#M261287</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-03-10T13:02:57Z</dc:date>
    </item>
  </channel>
</rss>

