BeOptimized - Tips and Tricks

Execute SAS in batch with windows scheduler

Windows scheduler can be used to execute automatically SAS code at specific moment of the day or at specific days of the month. They execute the same code every time but, thanks to macro, the output result could change thanks to the environment (data, time, user (etc.).)

Details

You are working on windows (local or have access to a remote server) and would like to schedule a SAS code using the windows task scheduler. This tips and tricks will provide you the step-by-step details of this approach:

  • Creation of a SAS code generating output in HTML and PDF
  • Creation of a .bat file containing the instructions to execute that SAS code,
  • Registration of the .bat file in the Windows scheduler.

Moreover, we will discuss the possibility to execute SAS code conditionally using basic macro variables and send emails from SAS.

Prerequisites

You have some SAS experience and would like to automate your SAS code execution.


Go back to your selection


This site uses cookies. .

By continuing to browse the site you are agreeing to our use of cookies. Review our cookies information for more details.