<?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: Store text filenames from a windows directory in to a sas macro in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Store-text-filenames-from-a-windows-directory-in-to-a-sas-macro/m-p/466438#M30248</link>
    <description>Thank you for a prompt response. As a quick fix, I have created a small macro. But, I am also simultaneously looking into sasautos to get more understanding.&lt;BR /&gt;&lt;BR /&gt;%macro declare_macros;&lt;BR /&gt;%let file_path = &amp;amp;toolkit.;&lt;BR /&gt;filename dirlist pipe "dir ""&amp;amp;file_path"" /b ";&lt;BR /&gt;&lt;BR /&gt;data dirlist;&lt;BR /&gt;infile dirlist missover pad;&lt;BR /&gt;input filename $1000.;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;set dirlist;&lt;BR /&gt;id = _n_;&lt;BR /&gt;call symputx("nobs",strip(id));&lt;BR /&gt;call symput('macro' || left(put(_n_, 4.)), trim(filename));&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%do ii = 1 %to &amp;amp;nobs.;&lt;BR /&gt;%include "&amp;amp;toolkit.&amp;amp;&amp;amp;macro&amp;amp;ii.";&lt;BR /&gt;%end;&lt;BR /&gt;%mend declare_macros;</description>
    <pubDate>Thu, 31 May 2018 13:29:54 GMT</pubDate>
    <dc:creator>mayankdce1</dc:creator>
    <dc:date>2018-05-31T13:29:54Z</dc:date>
    <item>
      <title>Store text filenames from a windows directory in to a sas macro</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Store-text-filenames-from-a-windows-directory-in-to-a-sas-macro/m-p/466403#M30240</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a windows directory in which I have&amp;nbsp;created a few macros as .txt files. I want to store the names of these text files in to a sas macro. The intent is that I want to declare (%include) all macros within that directory using this sas macro instead of asking user to enter all the macros one by one. Please note that each text file contains some lines of sas codes (and no data)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Mayank&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 11:34:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Store-text-filenames-from-a-windows-directory-in-to-a-sas-macro/m-p/466403#M30240</guid>
      <dc:creator>mayankdce1</dc:creator>
      <dc:date>2018-05-31T11:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Store text filenames from a windows directory in to a sas macro</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Store-text-filenames-from-a-windows-directory-in-to-a-sas-macro/m-p/466412#M30246</link>
      <description>&lt;P&gt;What you want to use is sasautos:&lt;BR /&gt;&lt;A href="http://documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetTarget=p12b2qq72dkxpsn1e19y57emerr6.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetTarget=p12b2qq72dkxpsn1e19y57emerr6.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;no&lt;/STRONG&gt;&lt;/U&gt; benefit to you coding this yourself.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 12:33:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Store-text-filenames-from-a-windows-directory-in-to-a-sas-macro/m-p/466412#M30246</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-05-31T12:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Store text filenames from a windows directory in to a sas macro</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Store-text-filenames-from-a-windows-directory-in-to-a-sas-macro/m-p/466438#M30248</link>
      <description>Thank you for a prompt response. As a quick fix, I have created a small macro. But, I am also simultaneously looking into sasautos to get more understanding.&lt;BR /&gt;&lt;BR /&gt;%macro declare_macros;&lt;BR /&gt;%let file_path = &amp;amp;toolkit.;&lt;BR /&gt;filename dirlist pipe "dir ""&amp;amp;file_path"" /b ";&lt;BR /&gt;&lt;BR /&gt;data dirlist;&lt;BR /&gt;infile dirlist missover pad;&lt;BR /&gt;input filename $1000.;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;set dirlist;&lt;BR /&gt;id = _n_;&lt;BR /&gt;call symputx("nobs",strip(id));&lt;BR /&gt;call symput('macro' || left(put(_n_, 4.)), trim(filename));&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%do ii = 1 %to &amp;amp;nobs.;&lt;BR /&gt;%include "&amp;amp;toolkit.&amp;amp;&amp;amp;macro&amp;amp;ii.";&lt;BR /&gt;%end;&lt;BR /&gt;%mend declare_macros;</description>
      <pubDate>Thu, 31 May 2018 13:29:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Store-text-filenames-from-a-windows-directory-in-to-a-sas-macro/m-p/466438#M30248</guid>
      <dc:creator>mayankdce1</dc:creator>
      <dc:date>2018-05-31T13:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Store text filenames from a windows directory in to a sas macro</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Store-text-filenames-from-a-windows-directory-in-to-a-sas-macro/m-p/466441#M30251</link>
      <description>&lt;P&gt;Thats not a quick fix, thats a very long fix, which may not work all the time and isn't portable.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;options sasautos=(&amp;amp;toolkit.);&lt;/PRE&gt;
&lt;P&gt;Is a quick fix.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 13:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Store-text-filenames-from-a-windows-directory-in-to-a-sas-macro/m-p/466441#M30251</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-05-31T13:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Store text filenames from a windows directory in to a sas macro</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Store-text-filenames-from-a-windows-directory-in-to-a-sas-macro/m-p/466770#M30286</link>
      <description>&lt;P&gt;Thank you, again. It worked! Much simpler method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2018 08:10:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Store-text-filenames-from-a-windows-directory-in-to-a-sas-macro/m-p/466770#M30286</guid>
      <dc:creator>mayankdce1</dc:creator>
      <dc:date>2018-06-01T08:10:30Z</dc:date>
    </item>
  </channel>
</rss>

