Execute SAS Program Via Command Line in UNIX/LINUX Console

In this tutorial we will learn how to Execute SAS Program Via Command Line in UNIX/LINUX Console.Let’s take an example what parameter needed to execute a SAS program from Console.

Execute SAS Program Via Command Line

<SAS PATH> -work <WORK PATH> <Code Path>/DEMO.sas

Here you have to replace highlighted values with your environment i.e.

  • <SAS PATH> -> Path where the SAS is installed on system.It varies version to version.
    • For SAS 9.2 version ->/sas92appl/sasroot/SASFoundation/9.2/sas
    • For SAS 9.3 version ->/sas93appl/sasroot/SASFoundation/9.3/sas
    • For SAS 9.4 version ->/sas94appl/sasroot/SASFoundation/9.4/sas
  • <WORK PATH> -> Path where all you want to perform all the runtime activities.It could be anything where you have write access.
  • <Code Path> -> Path where your code is placed.

Once you replaced the highlighted values with your environment values your code will be looked like this :

/sas94appl/sasroot/SASFoundation/9.4/sas -work /home/trenovision/work /home/trenovision/DEMO.sas

Hope you are now more clear about how you can Execute SAS Program Via Command Line in UNIX/LINUX Console. Feel free to comment if you have any query or error you’re while executing this code.

Happy Learning !!