Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Logging SAS:为什么%include不在日志中打印包含程序的注释?_Logging_Sas_Include_Comments - Fatal编程技术网

Logging SAS:为什么%include不在日志中打印包含程序的注释?

Logging SAS:为什么%include不在日志中打印包含程序的注释?,logging,sas,include,comments,Logging,Sas,Include,Comments,我正在使用%include为main.SAS运行许多较小的SAS程序。我希望所有较小程序中的注释都能打印到日志中,就像我单独运行每个程序一样。我似乎找不到一个选项来帮助我(比如只针对包含的程序的mprint)。我是SAS的新手,这可能是一个非常简单的问题,但我真的为此发疯了。现在我们正在讨论它,有谁能帮我了解一下输入和源之间的区别吗?我发现很难从SAS帮助页面获得帮助 非常感谢你! 基拉很简单。只需添加选项source2在主程序的开始处。这会告诉SAS将代码和注释打印到使用%includeSim

我正在使用%include为main.SAS运行许多较小的SAS程序。我希望所有较小程序中的注释都能打印到日志中,就像我单独运行每个程序一样。我似乎找不到一个选项来帮助我(比如只针对包含的程序的mprint)。我是SAS的新手,这可能是一个非常简单的问题,但我真的为此发疯了。现在我们正在讨论它,有谁能帮我了解一下输入和源之间的区别吗?我发现很难从SAS帮助页面获得帮助

非常感谢你!
基拉很简单。只需添加
选项source2在主程序的开始处。这会告诉SAS将代码和注释打印到使用
%include

Simple运行的所有程序的日志中。只需添加
选项source2在主程序的开始处。这会告诉SAS将代码和注释打印到使用
%include

运行的所有程序的日志中
SOURCE
SOURCE2
选项控制SAS代码是否包含在日志中。它们通常默认为
SOURCE
NOSOURCE2
。您可以更改SOURCE2系统选项,或将
/SOURCE2
选项添加到
%INCLUDE
语句中。使用这个小程序生成两个带有SAS代码的示例文件

filename file1 temp ;
filename file2 temp ;
data _null_;
  file file1 ;
  put '* This line is from FILE1;';
  file file2 ;
  put '* This line is from FILE2;';
run;
现在使用
%INCLUDE
,包括或不包括SOURCE2选项

%include file1 file2 ;
%include file1 file2 / source2 ;
下面是日志的外观

 71         %include file1 file2 ;
 74         %include file1 file2 / source2 ;
 NOTE: %INCLUDE (level 1) file FILE1 is file /tmp/SAS_workAEE90000185C_localhost.localdomain/#LN00050.
 75        +* This line is from FILE1;
 NOTE: %INCLUDE (level 1) ending.
 NOTE: %INCLUDE (level 1) file FILE2 is file /tmp/SAS_workAEE90000185C_localhost.localdomain/#LN00051.
 76        +* This line is from FILE2;
 NOTE: %INCLUDE (level 1) ending.
 77

SOURCE
SOURCE2
选项控制SAS代码是否包含在日志中。它们通常默认为
SOURCE
NOSOURCE2
。您可以更改SOURCE2系统选项,或将
/SOURCE2
选项添加到
%INCLUDE
语句中。使用这个小程序生成两个带有SAS代码的示例文件

filename file1 temp ;
filename file2 temp ;
data _null_;
  file file1 ;
  put '* This line is from FILE1;';
  file file2 ;
  put '* This line is from FILE2;';
run;
现在使用
%INCLUDE
,包括或不包括SOURCE2选项

%include file1 file2 ;
%include file1 file2 / source2 ;
下面是日志的外观

 71         %include file1 file2 ;
 74         %include file1 file2 / source2 ;
 NOTE: %INCLUDE (level 1) file FILE1 is file /tmp/SAS_workAEE90000185C_localhost.localdomain/#LN00050.
 75        +* This line is from FILE1;
 NOTE: %INCLUDE (level 1) ending.
 NOTE: %INCLUDE (level 1) file FILE2 is file /tmp/SAS_workAEE90000185C_localhost.localdomain/#LN00051.
 76        +* This line is from FILE2;
 NOTE: %INCLUDE (level 1) ending.
 77

你的第二个问题不清楚。在%include的上下文中,“输入文件”和“源文件”可能引用相同的内容(即%include语句正在读取的文件)。或者,“源”文件可能引用了包含%include语句的主失败。你能提供更多的上下文(引用文档或其他)来说明你在哪里看到这些术语吗?你的第二个问题不清楚。在%include的上下文中,“输入文件”和“源文件”可能引用相同的内容(即%include语句正在读取的文件)。或者,“源”文件可能引用了包含%include语句的主失败。你能提供更多的上下文(引用文档或任何东西)来说明你在哪里看到这些术语吗?我知道它必须很简单!我想我与SAS的最大问题是不理解SAS帮助页面的行话。非常感谢你!我知道这必须很简单!我想我与SAS的最大问题是不理解SAS帮助页面的行话。非常感谢你!谢谢你详细的回答:-)谢谢你详细的回答:-)