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.
moriniaAdvanced Analytics AnalystAsked:
Who is Participating?
d507201Database Marketing ConsultantCommented:
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.