简体   繁体   English

如何将SAS fullstimer选项的结果写入数据集?

[英]How can i write the results of SAS fullstimer option to a dataset?

We are evaluating the time taken for two set of codes in SAS. 我们正在评估SAS中两组代码所花费的时间。 Is there a way we can write/ tabulate option fullstimer results in a SAS dataset, without copying the entire log file into a notepad? 有没有一种方法可以在SAS数据集中写入/列出选项fullstimer结果,而无需将整个日志文件复制到记事本中?

I would go about it like this. 我会这样处理。

  1. Create separate SAS program files containing your code for each approach. 创建单独的SAS程序文件,其中包含每种方法的代码。 Include options fullstimer at the top of both. 包括两个顶部的options fullstimer
  2. Batch submit your programs and write the logs to permanent files using the -log command line option. 批量提交程序,然后使用-log命令行选项将日志写入永久文件。
  3. Create a simple program that reads in both logs and compares the results. 创建一个读取两个日志并比较结果的简单程序。

The last step can be accomplished by using data steps with the INFILE statement and restricting the input records to those which are standard output from FULLSTIMER. 可以通过对INFILE语句使用数据步骤并将输入记录限制为FULLSTIMER的标准输出来完成最后一步。 Then you can compare the created datasets however you wish, eg via PROC COMPARE. 然后,您可以根据需要比较创建的数据集,例如通过PROC COMPARE。

SAS has provided a log parsing macro that looks as though it should do the sort of thing that you want. SAS提供了一个日志解析宏,看起来好像它应该执行所需的操作。 It's available here: 在这里可用:

http://support.sas.com/kb/34/301.html http://support.sas.com/kb/34/301.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM