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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With