<?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: Scheduling SAS Queries in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43560#M11408</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am running on Windows 7 and SAS 9.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am assuming that I create a new SAS file and put those statements in there. Then Schedule that newly created file in task scheduler?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Feb 2012 19:18:36 GMT</pubDate>
    <dc:creator>vomer</dc:creator>
    <dc:date>2012-02-01T19:18:36Z</dc:date>
    <item>
      <title>Scheduling SAS Queries</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43558#M11406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am a new SAS user and I run 6 seperate sas files on a monthly basis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file1.sas ---&amp;gt; file6.sas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to run these files in a particular sequence and currently, I do this manually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way I can setup automation which will run the sas files in the order I want monthy?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 19:11:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43558#M11406</guid>
      <dc:creator>vomer</dc:creator>
      <dc:date>2012-02-01T19:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduling SAS Queries</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43559#M11407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are asking multiple questions and the answers may be dependent upon the type of system you are on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can always just have a driver program that has 6 %include statements, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%include "file1.sas";&lt;/P&gt;&lt;P&gt;%include "file2.sas";&lt;/P&gt;&lt;P&gt;%include "file3.sas";&lt;/P&gt;&lt;P&gt;%include "file4.sas";&lt;/P&gt;&lt;P&gt;%include "file5.sas";&lt;/P&gt;&lt;P&gt;%include "file6.sas";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then save that as a seventh program.&amp;nbsp; As for running it monthly, if you are on Windows, I've had good success using Window's Scheduler.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 19:18:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43559#M11407</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-01T19:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduling SAS Queries</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43560#M11408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am running on Windows 7 and SAS 9.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am assuming that I create a new SAS file and put those statements in there. Then Schedule that newly created file in task scheduler?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 19:18:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43560#M11408</guid>
      <dc:creator>vomer</dc:creator>
      <dc:date>2012-02-01T19:18:36Z</dc:date>
    </item>
    <item>
      <title>Scheduling SAS Queries</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43561#M11409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would first try to use %include.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%include "c:\file1.sas";&lt;/P&gt;&lt;P&gt;%include "c:\file2.sas";&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;%include "c:\file6.sas";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 19:20:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43561#M11409</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-02-01T19:20:31Z</dc:date>
    </item>
    <item>
      <title>Scheduling SAS Queries</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43562#M11410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks HaiKuo and Art! I will give this a try and report back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You guys are amazing &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 19:21:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43562#M11410</guid>
      <dc:creator>vomer</dc:creator>
      <dc:date>2012-02-01T19:21:57Z</dc:date>
    </item>
    <item>
      <title>Scheduling SAS Queries</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43563#M11411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Plus, here is a nice paper that addresses a number of issues you may or may not have thought about:&lt;/P&gt;&lt;P&gt;&lt;A href="http://analytics.ncsu.edu/sesug/2010/BB02.Zimmerman.pdf"&gt;http://analytics.ncsu.edu/sesug/2010/BB02.Zimmerman.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 19:23:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43563#M11411</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-01T19:23:36Z</dc:date>
    </item>
    <item>
      <title>Scheduling SAS Queries</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43564#M11412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This can be acheived using crontab from Unix prompt. If you have access to unix log in and type crontab -e to check access.&lt;/P&gt;&lt;P&gt;Next you need to create a shell script to invoke the SAS program and schedule it from crontab using the format below. I have been doing this for a while this has reduced lot of manual effort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Syntax for crontab:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Minute&amp;nbsp;&amp;nbsp; Hour&amp;nbsp;&amp;nbsp; Day of Month&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day of Week&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Command&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 21:53:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43564#M11412</guid>
      <dc:creator>Hima</dc:creator>
      <dc:date>2012-02-01T21:53:50Z</dc:date>
    </item>
    <item>
      <title>Scheduling SAS Queries</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43565#M11413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One thing that Art and Haikou didn't mention is that the %include approach will give you one giant log file unless you use PROC PRINTTO to redirect it within each program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An alternate approach is to create a Windows batch file that contains the SAS execution command and put that in once for each program.&amp;nbsp; You can find the syntax for your particular configuration by looking at the file association with the batch submission.&amp;nbsp; (I don't have windows 7, but in XP, it is in the windows explorer --&amp;gt; fools --&amp;gt; folder options --&amp;gt; file types and then go to SAS and click advanced and edit for the batch command.&amp;nbsp; You can also find the options in the SAS Companion for Windows.).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 15:06:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43565#M11413</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2012-02-02T15:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduling SAS Queries</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43566#M11414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;vomer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are two more considerations.&amp;nbsp; First, look at whether the option SOURCE2 is in place or not.&amp;nbsp; It determines whether %included lines get printed to the log or not.&amp;nbsp; That can nearly double the size of the log so you may want to turn it off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, it's possible from your post that each job depends on the one before completing successfully.&amp;nbsp; If that's the case, you could modify the program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro all_6_jobs;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %include&amp;nbsp; 'C:\file1.sas';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %if &amp;amp;syserr=0 %then %include 'C:\file2.sas';;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %if &amp;amp;syserr=0 %then %include 'C:\file3.sas';;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %if &amp;amp;syserr=0 %then %include 'C:\file4.sas';;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %if &amp;amp;syserr=0 %then %include 'C:\file5.sas';;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %if &amp;amp;syserr=0 %then %include 'C:\file6.sas';;&lt;/P&gt;&lt;P&gt;%mend all_6_jobs;&lt;/P&gt;&lt;P&gt;%ALL_6_JOBS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look up the possible values for &amp;amp;SYSERR to see if requiring 0 is too stringent for your purposes.&amp;nbsp; There are other slightly less strict possibilities.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 17:59:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Scheduling-SAS-Queries/m-p/43566#M11414</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-02-02T17:59:40Z</dc:date>
    </item>
  </channel>
</rss>

