SAS Base (45)

The following SAS program is submitted:

ods csvall file=’c:test.csv’;
proc print data=WORK.ONE;
var Name Score Grade;
by IdNumber;
run;
ods csvall close;

What is produced as output?

A. A file named test.csv that can only be opened in Excel.
B. A text file named test.csv that can be opened in Excel or in any text editor.
C. A text file named test.csv that can only be opened in a text editor.
D. A file named test.csv that can only be opened by SAS.

Check Answer
Answer: B

注解:ODS,全称Output Delivery System,用于导出SAS中数据和分析结果。开启ODS格式:
ODS destination file = ‘想要保存文件的路径+文件名.扩展名’;
关闭ODS格式:
ODS destination CLOSE;
其中destination用于定义导出文件的类型,比如题目中的CSVALL、HTML、PDF等。本题的程序输出的是CSV文件,可以用Excel和任意本文编辑器打开。

Leave a Reply

Your email address will not be published. Required fields are marked *