<?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: Auto run SAS Programs in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599660#M173135</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11462"&gt;@BaileyY&lt;/a&gt; a quick searched reveals many solution to your question.&lt;/P&gt;
&lt;P&gt;here is one possible solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro run_one (path);
   proc printto log="&amp;amp;path.log";
   run;
   proc printto print="&amp;amp;path.lst";
   run;
   %include "&amp;amp;path.sas";
   run;
%mend run_one;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 27 Oct 2019 17:28:19 GMT</pubDate>
    <dc:creator>VDD</dc:creator>
    <dc:date>2019-10-27T17:28:19Z</dc:date>
    <item>
      <title>Auto run SAS Programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599648#M173127</link>
      <description>&lt;P&gt;Hi.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have multiple programs (10) in a folder.&amp;nbsp; They are lengthy.&amp;nbsp; &amp;nbsp;Is there a SAS script that can allow me to write string of code to tell SAS to run all Programs within that folder?&amp;nbsp; &amp;nbsp;Thank you. Example: My SAS programs and original table files&amp;nbsp; D:\Data_Trending&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Oct 2019 15:59:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599648#M173127</guid>
      <dc:creator>BaileyY</dc:creator>
      <dc:date>2019-10-27T15:59:25Z</dc:date>
    </item>
    <item>
      <title>Auto run SAS Codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599653#M173131</link>
      <description>&lt;DIV class="lia-quilt-column lia-quilt-column-04 lia-quilt-column-left lia-quilt-column-main-left"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-left"&gt;
&lt;DIV class="lia-message-author lia-component-author"&gt;
&lt;DIV class="lia-message-author-ipaddress"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-20 lia-quilt-column-right lia-quilt-column-main-right"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-right"&gt;
&lt;DIV id="messagebodydisplay_0" class="lia-message-body"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;Hi.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have multiple programs (10) in a folder.&amp;nbsp; They are lengthy.&amp;nbsp; &amp;nbsp;Is there a SAS script that can allow me to write string of code to tell SAS to run all Programs within that folder?&amp;nbsp; &amp;nbsp;Thank you. Example: My SAS programs and original table files&amp;nbsp; D:\Data_Trending&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 27 Oct 2019 17:00:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599653#M173131</guid>
      <dc:creator>BaileyY</dc:creator>
      <dc:date>2019-10-27T17:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Auto run SAS Codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599656#M173132</link>
      <description>Hi:&lt;BR /&gt;  You already posted this question in the SAS Programming forum, here: &lt;A href="https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599648#M173127" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599648#M173127&lt;/A&gt; and that is probably a better place for the question than the Procedures forum.&lt;BR /&gt;Cynthia</description>
      <pubDate>Sun, 27 Oct 2019 17:14:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599656#M173132</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-10-27T17:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Auto run SAS Programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599658#M173133</link>
      <description>&lt;P&gt;I've merged your posts into one, please do not post the same question multiple times.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use %INCLUDE with a wild card to call all programs but they may not run in the order you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%include 'D:\Data_Trending\*.sas' / source2 lrecl=500;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SOURCE2 tells SAS to still put the code to the log and LRECL specifies the line length of the input program, the default is 256 I believe which can sometimes truncate your code causing issues.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11462"&gt;@BaileyY&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have multiple programs (10) in a folder.&amp;nbsp; They are lengthy.&amp;nbsp; &amp;nbsp;Is there a SAS script that can allow me to write string of code to tell SAS to run all Programs within that folder?&amp;nbsp; &amp;nbsp;Thank you. Example: My SAS programs and original table files&amp;nbsp; D:\Data_Trending&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Oct 2019 17:24:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599658#M173133</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-27T17:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Auto run SAS Programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599660#M173135</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11462"&gt;@BaileyY&lt;/a&gt; a quick searched reveals many solution to your question.&lt;/P&gt;
&lt;P&gt;here is one possible solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro run_one (path);
   proc printto log="&amp;amp;path.log";
   run;
   proc printto print="&amp;amp;path.lst";
   run;
   %include "&amp;amp;path.sas";
   run;
%mend run_one;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 27 Oct 2019 17:28:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599660#M173135</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-10-27T17:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Auto run SAS Programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599682#M173157</link>
      <description>Thank you so much!!  You are my favorite for responses.  I am not an expert SAS programmer and some of the existing code on this forum can be difficult to understand and translate.  You always provide exceptional explanation with your help.  So appreciate you on this forum!  Thank you!</description>
      <pubDate>Sun, 27 Oct 2019 20:28:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Auto-run-SAS-Programs/m-p/599682#M173157</guid>
      <dc:creator>BaileyY</dc:creator>
      <dc:date>2019-10-27T20:28:00Z</dc:date>
    </item>
  </channel>
</rss>

