楼主: lime_kim
751 3

[问答] 求问SAS Advance 130 v2 Q14 [推广有奖]

  • 0关注
  • 0粉丝

本科生

4%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
学术水平
2 点
热心指数
2 点
信用等级
1 点
经验
584 点
帖子
42
精华
0
在线时间
67 小时
注册时间
2014-8-4
最后登录
2018-12-7

lime_kim 发表于 2016-8-15 11:05:51 |显示全部楼层
如题。
题目如下:
Consider the following SAS log:

data sasuser.ranch sasuser.condo / view=sasuser.ranch;
set sasuser.houses;
if style='RANCH' then output sasuser.ranch;
else if style='CONDO' then output sasuser.condo;
run;
(NOTE: DATA STEP view saved on file SASUSER.RANCH.
NOTE: A stored DATA STEP view cannot run under a different operating system.)

proc print data=sasuser.condo;
(EROR: File SASUSER.CONDO.DATA does not exist.)

run;
(NOTE: The SAS System stopped processing this step because of errors.)

Which one of the following explains why the PRINT procedure fails?
A. SASUSER.CONDO is a stored DATA step program.
B. A SAS data file and SAS data view cannot be created in the same DATA step.
C. A second VIEW=SASUSER.CONDO option was ommited on the DATA statement.
D. The view SASUSER.RANCH must be processed before SASUSER.CONDO is created.

题目中是没有括号的,但为了格式清晰,我就加上啦。
答案应该D。
麻烦大家解释一下这道题啦,谢谢!


关键词:ADVANCE advan VANCE ance Van

已有 1 人评分信用等级 收起 理由
eijuhz + 1 精彩帖子

总评分: 信用等级 + 1   查看全部评分

stata SPSS
wwang111 发表于 2016-8-15 17:34:20 |显示全部楼层
from sas help:
If you specify additional data sets in the DATA statement, SAS creates these data sets when the view is processed in a subsequent DATA or PROC step. Views have the capability of generating other data sets at the time the view is executed.

举个例子:
data class1 class2 / view=class1;
set sashelp.class;
run;

proc print data=class1;
run;
运行完data步之后,只能建立一个view的class1, class2这时候是不能建立的,在proc步对view的class1处理的时候,class2才会同时建立。
回复

使用道具 举报

lime_kim 发表于 2016-8-17 22:57:16 |显示全部楼层
wwang111 发表于 2016-8-15 17:34
from sas help:
If you specify additional data sets in the DATA statement, SAS creates these data se ...
解释得很详细,非常感谢!
回复

使用道具 举报

wanqingyin7 学生认证  发表于 2018-7-10 03:37:48 |显示全部楼层
wwang111 发表于 2016-8-15 17:34
from sas help:
If you specify additional data sets in the DATA statement, SAS creates these data se ...
谢谢解释~~~
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 我要注册

GMT+8, 2018-12-10 11:03