02-21-2014 10:03 AM
I am trying to save my log and ouput programmitcally to a file using following codes, as this used to work just fine on PC SAS:
I don't see any error as such or notes, but still I don't see any file created at the specified location:
'OUT; FILE OUTFILE';
'LOG; FILE LOGFILE';
02-21-2014 10:11 AM
Looks like part of it didn't copy over ..here is the whole code:
FILENAME OUTFILE "C:\output.lst";
FILENAME LOGFILE "C:\log.log";
DM 'OUT; FILE OUTFILE';
DM 'LOG; FILE LOGFILE';
02-21-2014 11:09 AM
That would only work while running interactively so that Display Manager is running. If you are running a batch program or submitting to an execution server then there is no display manager to run the DM comands.
You could use
PROC PRINTTO log = "C:\log.log" print = "C:\output.lst";
But you would need to run that BEFORE the code runs, not after.