user3529091
user3529091

Reputation: 91

SAS X command syntax to generate log file on linux server

I'm trying to get the log file from submitting a SAS program using X command in EG.

My program runs fine but no log file is generated.

I've tried all these.

x sas "&basedir.simulation/run2003.sas " -log "&basedir.log/logrun.log" &;

x sas "&basedir.simulation/run2003.sas " -log "/pm/code/dev/log/logrun.log" &;

x sas "&basedir.simulation/run2003.sas " -log '/pm/code/dev/log/logrun.log' &;

Upvotes: 1

Views: 630

Answers (2)

user3529091
user3529091

Reputation: 91

I found out you have to use -altlog instead of -log.

This works.

x sas "&basedir.simulation/run2003.sas" -altlog "&basedir/log/log2003.log" &;

Upvotes: 0

DomPazz
DomPazz

Reputation: 12465

Try:

x " sas &basedir.simulation/run2003.sas  -log '/pm/code/dev/log/logrun.log' &";

You could also try it in a Data Step and use call system()

data _null_;
format runme $200.;
runme = "sas &basedir.simulation/run2003.sas -log '/pm/code/dev/log/logrun.log'" || '&';
call system(runme);
run;

Upvotes: 1

Related Questions