<?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: Automatic scheduler for SAS job in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236482#M55242</link>
    <description>Atually i want to write sas program required to create a file in database, then i want to use a time schedule from windows</description>
    <pubDate>Wed, 25 Nov 2015 19:19:03 GMT</pubDate>
    <dc:creator>siddharthpeesary</dc:creator>
    <dc:date>2015-11-25T19:19:03Z</dc:date>
    <item>
      <title>Automatic scheduler for SAS job</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236465#M55233</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I have a file named&amp;nbsp;DDA_BASED_S9_&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;20151030&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I have a folder where &amp;nbsp;every month end &lt;STRONG&gt;above file&lt;/STRONG&gt; will be dumped(the file name will be same except only month and year (i.e&amp;nbsp;&lt;STRONG&gt;201510&lt;/STRONG&gt;)&lt;/P&gt;
&lt;P&gt;so My job is&amp;nbsp;to&amp;nbsp;running every month&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1)&lt;/STRONG&gt;libname mydblib odbc datasrc=XXXXX user=XXXXXXX password=XXXXXXX; (-&amp;gt;creates connection)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2)&lt;/STRONG&gt;%macro importdata(infile=,outfile=,type=,filter=);&lt;BR /&gt;proc import&lt;BR /&gt;datafile=&amp;amp;infile&lt;BR /&gt;dbms=&amp;amp;type&lt;BR /&gt;out=&amp;amp;outfile&lt;BR /&gt;replace;&lt;BR /&gt;&amp;amp;filter&lt;BR /&gt;run;&lt;BR /&gt;%mend importdata;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;%importdata(infile='PATH\&lt;SPAN&gt;DDA_BASED_S9_&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;20151030&lt;/STRONG&gt;&lt;/FONT&gt;.csv',outfile=&lt;SPAN&gt;DDA_BASED_S9_&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;20151030&lt;/STRONG&gt;&lt;/FONT&gt;,type=csv,filter=); (-&amp;gt;imports file)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3)&lt;/STRONG&gt;data mydblib.&lt;SPAN&gt;DDA_BASED_S9_&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;20151030&lt;/STRONG&gt;&lt;/FONT&gt;;(-&amp;gt;&lt;STRONG&gt;saves data into the database&lt;/STRONG&gt;)&lt;BR /&gt;set &lt;SPAN&gt;DDA_BASED_S9_&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;20151030&lt;/STRONG&gt;&lt;/FONT&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Program for Automation work:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;But Now I like to make it automated,&lt;/P&gt;
&lt;P&gt;1)I like to write a program so every month where it has to check for paricular &lt;STRONG&gt;FILE&lt;/STRONG&gt; in an particular &lt;STRONG&gt;FOLDER&lt;/STRONG&gt;&amp;nbsp;automatically without opening sas program, like using scheduler and send the file to database&lt;/P&gt;
&lt;P&gt;can anyone &amp;nbsp;tell me the process(code) for it ,it will be very helpful thanks. SO that i can use for other programs as a reference&lt;/P&gt;
&lt;P&gt;Thanks In Advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if there are any misconception.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2015 17:41:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236465#M55233</guid>
      <dc:creator>siddharthpeesary</dc:creator>
      <dc:date>2015-11-25T17:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic scheduler for SAS job</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236474#M55236</link>
      <description>&lt;P&gt;There are many schedulers available that can check for the existence of a file to trigger a batch job. Where are you going to run your SAS job? On a PC or on a SAS server? If it is a SAS server, which is what I would recommend, I suggest you talk to your SAS admin folks to see how they schedule jobs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running scheduled tasks on PCs is not very reliable as they need to be switched on, have a working network connection, and have a valid username for running the scheduled task under. Servers are much better for this.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2015 18:51:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236474#M55236</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-11-25T18:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic scheduler for SAS job</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236476#M55237</link>
      <description>I like to run sas job on PC(windows)</description>
      <pubDate>Wed, 25 Nov 2015 19:09:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236476#M55237</guid>
      <dc:creator>siddharthpeesary</dc:creator>
      <dc:date>2015-11-25T19:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic scheduler for SAS job</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236478#M55238</link>
      <description>This Post might Help ..&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Enterprise-Guide/Scheduled-Jobs/m-p/139179#U139179" target="_blank"&gt;https://communities.sas.com/t5/SAS-Enterprise-Guide/Scheduled-Jobs/m-p/139179#U139179&lt;/A&gt;</description>
      <pubDate>Wed, 25 Nov 2015 19:12:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236478#M55238</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-25T19:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic scheduler for SAS job</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236479#M55239</link>
      <description>There is a Schedule option in windows itself ..Pls Google it ..you will find the answer ...</description>
      <pubDate>Wed, 25 Nov 2015 19:13:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236479#M55239</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-25T19:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic scheduler for SAS job</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236480#M55240</link>
      <description>I will check it thanks</description>
      <pubDate>Wed, 25 Nov 2015 19:14:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236480#M55240</guid>
      <dc:creator>siddharthpeesary</dc:creator>
      <dc:date>2015-11-25T19:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic scheduler for SAS job</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236481#M55241</link>
      <description>&lt;P&gt;The Windows task scheduler can be used with SAS but it can only do time scheduling, not file event scheduling. You would need to either use a third-party scheduler of your choice that can do file events&amp;nbsp;or add a file exist check to your SAS job.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2015 19:16:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236481#M55241</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-11-25T19:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic scheduler for SAS job</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236482#M55242</link>
      <description>Atually i want to write sas program required to create a file in database, then i want to use a time schedule from windows</description>
      <pubDate>Wed, 25 Nov 2015 19:19:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236482#M55242</guid>
      <dc:creator>siddharthpeesary</dc:creator>
      <dc:date>2015-11-25T19:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic scheduler for SAS job</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236483#M55243</link>
      <description>&lt;P&gt;If you don't want to check for the existence of your input file in the scheduler then the Windows scheduler in your Control Panel can just do the time scheduling.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2015 19:24:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236483#M55243</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-11-25T19:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic scheduler for SAS job</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236485#M55244</link>
      <description>Kiwi I have to check the existence of file inside the sas job</description>
      <pubDate>Wed, 25 Nov 2015 19:27:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236485#M55244</guid>
      <dc:creator>siddharthpeesary</dc:creator>
      <dc:date>2015-11-25T19:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic scheduler for SAS job</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236493#M55246</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/47212"&gt;@siddharthpeesary﻿&lt;/a&gt;&amp;nbsp;first you say you want a program to check the file without opening SAS. Then you say that the SAS program need to do this. Contradictory.&lt;/P&gt;
&lt;P&gt;If you want a scheduler/OS script to this, you need to search on such forum instead, not SAS communities.&lt;/P&gt;
&lt;P&gt;If you need a SAS program to do the check, there are lots of&amp;nbsp;external file functions in SAS that are useful in situations like this.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2015 20:42:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236493#M55246</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-11-25T20:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic scheduler for SAS job</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236494#M55247</link>
      <description>&lt;P&gt;In that case check out the FILEEXIST function as it will do what you require:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/67960/HTML/default/viewer.htm#n06xm8hwk0t0axn10gj16lfiri43.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lefunctionsref/67960/HTML/default/viewer.htm#n06xm8hwk0t0axn10gj16lfiri43.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2015 20:46:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Automatic-scheduler-for-SAS-job/m-p/236494#M55247</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-11-25T20:46:25Z</dc:date>
    </item>
  </channel>
</rss>

