• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 456
  • Last Modified:

Executing a SAS program from windows

I have SAS installed on my c drive.   Is there a way to execute a SAS program from a vb or bat file.
1 Solution
Let's say that you have SAS installed in this directory --
     c:\program files\sas92

Running SAS in a batch file to execute a program is very much like running it from a command line.  I don't know about VB though.

To run SAS from the command line to execute a program you basically specify the fully-defined path and filename of the executable followed by the fully-defined path and filename of the program.  Such as

     c:\program files\sas\sas92\sas c:\my sas programs\sales\monthly product sales.sas

By default the log and listing are written to the same directory where the program resides.  There are options for redirecting the log and listing and _lots_ of other options but this should get you started.


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now