<?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 of the SAS jobs in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Auto-run-of-the-SAS-jobs/m-p/445115#M111506</link>
    <description>&lt;P&gt;You do&amp;nbsp;not need a macro for that, a simple datastep with an ABORT statement will suffice:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  if weekday(today()) not in(2,3) then
    abort return 0;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you put that in the top of your program, it will only run on Mondays and Tuesdays.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Mar 2018 11:43:40 GMT</pubDate>
    <dc:creator>s_lassen</dc:creator>
    <dc:date>2018-03-13T11:43:40Z</dc:date>
    <item>
      <title>Auto run of the SAS jobs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Auto-run-of-the-SAS-jobs/m-p/445096#M111494</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used to schedule the SAS codes using windows scheduler. The sas codes are running daily basis from the system.&lt;BR /&gt;Now I need to schedule the job only in Monday and Tuesday. And I want to use a logic in macro for running the code in Monday and Tuesadyand disable the other days run .&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 10:19:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Auto-run-of-the-SAS-jobs/m-p/445096#M111494</guid>
      <dc:creator>ambadi007</dc:creator>
      <dc:date>2018-03-13T10:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Auto run of the SAS jobs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Auto-run-of-the-SAS-jobs/m-p/445097#M111495</link>
      <description>&lt;P&gt;A solution would involved the following language constructs -&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%sysfunc macro function&lt;BR /&gt;&lt;A href="http://documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=p1o13d7wb2zfcnn19s5ssl2zdxvi.htm" target="_blank"&gt;http://documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=p1o13d7wb2zfcnn19s5ssl2zdxvi.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%IF-%THEN/%ELSE Statement&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetTarget=n18fij8dqsue9pn1lp8436e5mvb7.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetTarget=n18fij8dqsue9pn1lp8436e5mvb7.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;%MACRO Statement&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetTarget=p1nypovnwon4uyn159rst8pgzqrl.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetTarget=p1nypovnwon4uyn159rst8pgzqrl.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;today function&lt;BR /&gt;&lt;A href="http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0hm9egy8s7mokn1mz0yxng80ax5.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0hm9egy8s7mokn1mz0yxng80ax5.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;weekday function&lt;BR /&gt;&lt;A href="http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0ahi8tk3trkv5n173sil9hd7c62.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0ahi8tk3trkv5n173sil9hd7c62.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;and lastly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;endsas statement&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=p1aok1r21bw4oqn17duao6d81m2l.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=p1aok1r21bw4oqn17duao6d81m2l.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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Take a read through this documentation and you should have what you need to put together a nice solution.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 10:34:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Auto-run-of-the-SAS-jobs/m-p/445097#M111495</guid>
      <dc:creator>SimonDawson</dc:creator>
      <dc:date>2018-03-13T10:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Auto run of the SAS jobs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Auto-run-of-the-SAS-jobs/m-p/445099#M111496</link>
      <description>&lt;P&gt;You are already using a scheduler:&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;windows scheduler"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Within that application, there is the functionality to schedule code to run on specific days.&amp;nbsp; Use that, don't try to re-invent the wheel.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 10:42:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Auto-run-of-the-SAS-jobs/m-p/445099#M111496</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-03-13T10:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Auto run of the SAS jobs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Auto-run-of-the-SAS-jobs/m-p/445115#M111506</link>
      <description>&lt;P&gt;You do&amp;nbsp;not need a macro for that, a simple datastep with an ABORT statement will suffice:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  if weekday(today()) not in(2,3) then
    abort return 0;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you put that in the top of your program, it will only run on Mondays and Tuesdays.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 11:43:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Auto-run-of-the-SAS-jobs/m-p/445115#M111506</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2018-03-13T11:43:40Z</dc:date>
    </item>
  </channel>
</rss>

