SAS中文论坛

标题: 请教两道sas base题目 [打印本页]

作者: shiyiming    时间: 2012-9-3 21:24
标题: 请教两道sas base题目
the following sas program is submitted:
ods html file='newfile.html';
proc print data=sasuser.houses;
run;
proc means data=sasuser.houses;
run;
proc freq data=sasuser.shoes;
run;
ods html close;
proc print data=sasuser.shoes;
run;

how many html files are created?
答案是1.
我上机run了一下,得到的file分别是newfile,newfile1,newfile2 html文件。答案照这样讲应该是3啊。不太明白为什么。难道是答案有问题?

另外一道:
首先给出数据集bank:
name rate
a 0.1
b 0.2
c 0.3
给出程序:
data test;
do year=1 to 3;
set bank;
capital+5000;
end;
run;
问test里有几个观测?答案是一个。不太明白是怎么回事。请教大家,先谢过。
作者: shiyiming    时间: 2012-9-17 23:31
标题: Re: 请教两道sas base题目
第一题,在我本机上测试,是生成一个报表,代码如下,
类似于ods html file------ods html close;结构的模式,
其间的报表都输出到同一个file中。
[code:80pdyg7f]
data one;
input x@@;
datalines;
1 2 2 3 3 3
;
ods html file='c:\DataAnalysis\newfile.html';
proc print data=one;
run;
proc means data=one;
run;
proc freq data=one;
run;
ods html close;
[/code:80pdyg7f]
第二题,sas默认在一次迭代中(即 data 和 run 之间),从pdv中,只写入一次到数据集。
作者: shiyiming    时间: 2012-12-5 13:14
标题: Re: 请教两道sas base题目
第一题产生一个html文件,文件名为newfile。
SAS 将ods pdf file=~~~;    ods pdf close;语句间的内容都集合到一个html中。
作者: shiyiming    时间: 2012-12-5 16:04
标题: Re: 请教两道sas base题目
The HTML file contains the results of all procedure steps between the ODS HTML statement and ODS HTML CLOSE statement.




欢迎光临 SAS中文论坛 (http://mysas.net/forum/) Powered by Discuz! X3.2