BookmarkSubscribeRSS Feed
GeorgeSAS
Lapis Lazuli | Level 10

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!

3 REPLIES 3
art297
Opal | Level 21

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

 

Kurt_Bremser
Super User

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.

GeorgeSAS
Lapis Lazuli | Level 10
.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" & 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1270 views
  • 0 likes
  • 3 in conversation