Hello everyone,
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.
Thank you!
Here are some of the possible methods: http://blogs.sas.com/content/sgf/2013/08/14/four-ways-to-schedule-sas-tasks/
Art, CEO, AnalystFinder.com
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.
.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" &
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.