06-21-2017 07:23 PM
I run SAS at PC environment. I have a sas code needto be schedualled running(with windows task schedular) without open SAS software. Please teach me how to do it.
For example, I want the SAS program to be runned at each Sunday on10:00 AM.
06-22-2017 03:59 AM
The way you wrote your question, this is impossible. You can't run SAS programs without SAS.
If you just want to avoid that any kind of interactive SAS software (a Display Manager, or Enterprise Guide) opens on the desktop, you need to look at #1 in the link provided by @art297
This all depends on how your SAS environment is set up. If you have a SAS server and use SAS Studio in a browser or Enterprise Guide to connect to it, then running SAS batch jobs from the desktop will be a helluva lot of work, and work reliably only on every February 35th in odd leapyears.
In this case, create the batch file or shell script on the server and use the server's scheduling. If you have any kind of organization-wide scheduling in place that is run by the datacenter, attach your jobs to that. Takes quite some work upfront, but is the best option in the long run.
06-23-2017 06:22 PM - edited 06-23-2017 06:46 PM
.bat submit to pc "C:\Program Files\SASHome\SASFoundation\9.3\sas.exe" -SYSIN "C:\Users\test123.sas" -logparm "OPEN=APPEND" -LOG "C:\Users\test123.LOG" .bat submit to mainframe rem ** mainframe aaa submit rem ** submit C:\zschedule rem ** Z: cd "\akaa\asdf\" ftpjob C:\Users\aaaaa\Documents\WORK\Projects\a_batch\a1forthistime >C:\Users\aaaaa\Documents\WORK\Projects\a_batch\a1forthistime.log rem ** rolllog c:\zschedule\a2forthistime.log /a 6 exit .sh sas /home/user/zcrontab/zcrontabtest.sas >/home/user/zcrontab/zcrontabtest.log -logparm "OPEN=APPEND" &