Sas 将当前会话日志输出到日志窗口和文件

Sas 将当前会话日志输出到日志窗口和文件,sas,Sas,有没有办法让Base Sas 9.3将当前会话日志打印到日志窗口和日志文件?我可以使用printto过程进行切换,但据我所知,它只能执行其中一项操作。您可以始终使用proc printto将其发送到文件,关闭proc printto,然后读入并输出。这实际上可以让您突出显示日志,这很好 filename a temp; proc printto log=a; run; proc freq data=sashelp.class; run; proc printto; run; data _nul

有没有办法让Base Sas 9.3将当前会话日志打印到日志窗口和日志文件?我可以使用printto过程进行切换,但据我所知,它只能执行其中一项操作。

您可以始终使用
proc printto
将其发送到文件,关闭proc printto,然后读入并输出。这实际上可以让您突出显示日志,这很好

filename a temp;
proc printto log=a;
run;
proc freq data=sashelp.class;
run;
proc printto;
run;

data _null_;
infile a;
input @;
put _infile_;
run;

您可以始终使用
proc printto
将其发送到文件,关闭proc printto,然后将其读入并输出。这实际上可以让您突出显示日志,这很好

filename a temp;
proc printto log=a;
run;
proc freq data=sashelp.class;
run;
proc printto;
run;

data _null_;
infile a;
input @;
put _infile_;
run;

另一个选项:ALTLOG。这仅在系统启动时有效(可以附加到快捷方式中的SAS可执行文本中,也可以放在配置文件中),因此它不是很灵活;但它允许您的日志进入文件和屏幕。所以如果你的捷径是

c:\pathtosas\sas.exe -config "myconfigfiledetails"
您可以附加

c:\pathtosas\sas.exe -config "myconfigfiledetails" -altlog "c:\temp\seemylog.txt"

(当然,用正确的文本替换虚拟文本)。

另一个选项:ALTLOG。这仅在系统启动时有效(可以附加到快捷方式中的SAS可执行文本中,也可以放在配置文件中),因此它不是很灵活;但它允许您的日志进入文件和屏幕。所以如果你的捷径是

c:\pathtosas\sas.exe -config "myconfigfiledetails"
您可以附加

c:\pathtosas\sas.exe -config "myconfigfiledetails" -altlog "c:\temp\seemylog.txt"
(当然,用正确的文本替换虚拟文本)