我看到只有在完成STP后,SAS存储过程(STP)的日志信息才会附加到.log文件中。我想通过拖尾STP日志文件来监视长时间运行的STP。有没有办法让SAS立即写入日志信息而不是这种延迟行为?
示例:我启动STP(stp_test.sas)并拖尾日志文件。最后一行见:
2016-02-19T11:05:03,630 INFO [00000004] :sassrv - [00000003] STPXUTL Execute using file path: /SAS/SASHome/SASFoundation/9.4/sasstp/stp_test.sas
仅在完成(53秒后)后,我会得到以下几行,特别是对我来说很重要的NOTES。
2016-02-19T11:05:56,634 INFO [00079501] 8:sasmi - STP: 3: Execution Complete. Status=4
2016-02-19T11:05:56,678 INFO [00079501] 8:sasmi - NOTE: %INCLUDE (level 1) file /SAS/SASHome/SASFoundation/9.4/sasstp/stp_test.sas is file /SAS/SASHome/SASFoundation/9.4/sasstp/stp_test.sas.
2016-02-19T11:05:56,679 INFO [00079501] 8:sasmi - NOTE: PROCEDURE SQL used (Total process time):
2016-02-19T11:05:56,679 INFO [00079501] 8:sasmi - real time 0.00 seconds
2016-02-19T11:05:56,679 INFO [00079501] 8:sasmi - cpu time 0.01 seconds
答案 0 :(得分:1)
您可以将代码包装在proc printto:
中filename stplog temp;
proc printto log=stplog;run;
*your stp goes here;
proc printto;run;
现在,日志将写入Stored Process Server工作目录中的此临时文件。我仍然会像罗伯特建议的那样添加write = immediate。
答案 1 :(得分:0)