Question:
This question is related to SAS version 9.4. There is one instance of Linux (Redhat Enterprise Linux 7) test server where we have installed SAS 9.4 and the post configuration is completed for Lev 1.
This question is related to SAS version 9.4. There is one instance of Linux (Redhat Enterprise Linux 7) test server where we have installed SAS 9.4 and the post configuration is completed for Lev 1.
I got the prompt and able to write SAS Code. Now, I want to run SAS job in batch mode with command line like (sas sas-program-name.sas), what are the configuration that needs to be done?
Answer:
Keep in mind that you have to use the absolute path if the directory of an app is not in your PATH variable. For example:
/path-to/sas sasprogram.sas
Additional options can be used like this:
To write log:
-log saslog.log
To use a specific config file:
-config sasv9.cfg
Example:
Below is how I run sas from Windows in command line:
c:\Program Files\SASHome\SASFoundation\9.4\Sas.exe” -sysin c:\SASPrograms\prog1.sas -config ”c:\Program Files\SASHome\SASFoundation\9.4\sasv9.cfg
Below is the code I used to run from Linux:
/sas/config/Lev1/SASApp/BatchServer/sasbatch.sh -log /sas/qat/Lev1/SASApp/BatchServer/Logs/job_for_batch_#Y.#m.#d_#H.#M.#s.log -batch -noterminal -logparm "rollover=session" -sysin /home/venkat/sales.sas
Comments
Post a Comment