Schedual Submit a SAS code without open SAS console

Reply
Regular Contributor
Posts: 241

Schedual Submit a SAS code without open SAS console

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!

PROC Star
Posts: 7,474

Re: Schedual Submit a SAS code without open SAS console

Posted in reply to GeorgeSAS

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

 

Super User
Posts: 7,809

Re: Schedual Submit a SAS code without open SAS console

Posted in reply to GeorgeSAS

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Regular Contributor
Posts: 241

Re: Schedual Submit a SAS code without open SAS console

[ Edited ]
Posted in reply to KurtBremser
.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" & 
Ask a Question
Discussion stats
  • 3 replies
  • 127 views
  • 0 likes
  • 3 in conversation