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"

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