BookmarkSubscribeRSS Feed
AlexCarey
Calcite | Level 5

Hi Team,

I am newbie in SAS base 9.4 tool. Normally I execute SAS master code using SAS base 9.4 tool. Currently I am looking to schedule those master code using windows scheduler along with some dependencies amongst them.

Can you please advise how to automate schedule those SAS code using windows scheduler.

Thanks in advance.

1 REPLY 1
japelin
Rhodochrosite | Level 12
you can use -sysin for batch mode.

In Task scheduler,
- specify the full path of SAS.exe in Program/Script
- specify the path of the sas program in -sysin, and the log output destination in -log as arguments, you can run the program in the task scheduler.

For example
[%PROGRAMFILES%\SASHome\SASFoundation\9.4\sas.exe] in Program/Script box
and
[-sysin "C:\Temp\test.sas" -log "C:\Temp\test.log"] in parameter box

If you want to run multiple programs, you can create a bat file with the following command and register it in the scheduler.

%PROGRAMFILES%\SASHome\SASFoundation\9.4\sas.exe -sysin "sasprogram1.sas" -log "logfilepath1.log"
%PROGRAMFILES%\SASHome\SASFoundation\9.4\sas.exe -sysin "sasprogram2.sas" -log "logfilepath2.log"

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 1 reply
  • 542 views
  • 0 likes
  • 2 in conversation