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-2024.png

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.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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