Executing a SAS program from windows

Posted on 2011-10-19
Last Modified: 2013-11-16
I have SAS installed on my c drive.   Is there a way to execute a SAS program from a vb or bat file.
Question by:morinia
    1 Comment
    LVL 7

    Accepted 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

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
    This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now