Link to home
Start Free TrialLog in
Avatar of ahowe42
ahowe42Flag for Türkiye

asked on

SAS Script works fine but not when run from command line

I am working on a research project which involves a simulation study in which MATLAB calls SAS using the DOS command, passing a script to run, as in:

"c:\sas\SAS 9.1\sas.exe" "C:\Documents and Settings\User\Desktop\nea\sasscript.sas",

the final result of the script is several output files in the same directory.  My SAS script runs perfectly fine when I open and run it by hand.  However, when run via the command line, the output files are not created.  There are no errors in the log file created by SAS.  Using MATLAB is not the problem; I can even just run the above from the command line directly, and get the same behavior.

I know I have solved this before, but that was 3 years ago on different computer, and I can't find that I documented it (didn't have evernote then :-().  I have attached a sample script file.

Anyone have any ideas?

Andrew
sample.sas
ASKER CERTIFIED SOLUTION
Avatar of ahowe42
ahowe42
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial