Murray
Murray

Reputation: 719

SAS Proc Printto clears the log

I'm using Proc Printto to save the log & output to a directory, which it does quite nicely, however the log is no longer printed in the log window. I still prefer to use the log for debugging.

proc printto 
    print='<directory>\output.lst' 
    log = '<directory>\log.log'
    new; 
run; 

(The new option replaces any existing log - works same as replace in other procs)

Many thanks.

Upvotes: 4

Views: 3684

Answers (2)

Ralph Winters
Ralph Winters

Reputation: 287

-ALTPRINT would do it for the listing output. However if you are in interactive SAS, ODS HTML will generate output if you are using the HTML output window, so it is usually unnecessary. In some operating system, e.g UNIX, LINUX you are able to browse/search the output as it is being written. That is typically the way I do it when working in those OS's.

Upvotes: 1

Chris J
Chris J

Reputation: 7769

You can use the -ALTLOG option when launching SAS (e.g. in the shortcut) to divert the entire session log to a specified file.

Example shortcut target: "C:\Program Files\SAS\SAS 9.1\sas.exe" -AUTOEXEC "c:\autoexec.sas" -CONFIG "z:\sas\temp\sasv9.cfg" -ALTLOG "c:\altlog.txt"

There maybe an option for the output also.

Upvotes: 2

Related Questions