全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2681 3
2016-08-15
如题。
题目如下:
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。
麻烦大家解释一下这道题啦,谢谢!


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
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才会同时建立。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

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 ...
解释得很详细,非常感谢!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

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 ...
谢谢解释~~~
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群