Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run SAS from command line without GUI

Tags:

sas

How can I write and run SAS code from linux command line (eg, the terminal, from which all other programs can be executed)?

Eg, use a text editor to create a file like 'file.sas' then run in the command line

'sas file.sas'

Ie, can I run without using the sas command line and user interface

For example, in python you can write a .py script in a text editor and execute using python file.py

like image 601
user0 Avatar asked Oct 16 '25 09:10

user0


1 Answers

As long as you can locate the SAS Foundation installation folder you can execute a sas session from the terminal.

See sample command below: opening a sas session and specifying the file to execute and where to save the log file:

/sas/940/SASFoundation/9.4/sas /projects/program1.sas -log "/projects/program1.log" 

SAS Command line documentation here

like image 127
momo1644 Avatar answered Oct 19 '25 10:10

momo1644