楼主: Amandanannn
2884 2

[学习分享] SAS Advance Q63中第11与29题 [推广有奖]

  • 0关注
  • 1粉丝

本科生

6%

还不是VIP/贵宾

-

威望
0
论坛币
3 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
16704 点
帖子
40
精华
0
在线时间
79 小时
注册时间
2015-12-12
最后登录
2018-7-13

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
Item 11   
The following SAS code is submitted:   
data WORK.TEMP WORK.ERRORS / view=WORK.TEMP;
     infile RAWDATA;   
     input Xa Xb Xc;   
     if Xa=. then output WORK.ERRORS;   
     else output WORK.TEMP;     
  run;

Which of the following is true of the WORK.ERRORS data set?     
A. The data set is created when the DATA step is submitted.   
B. The data set is created when the view TEMP is used in another SAS step.   
C. The data set is not created because the DATA statement contains a syntax error.  
D. The descriptor portion of WORK.ERRORS is created when the DATA step is
submitted
(选B)

Item 29   
The following program is submitted to check the variables Xa, Xb, and Xc in the
SASUSER.LOOK data set:  
   data _null_ WORK.BAD_DATA / view=WORK.BAD_DATA ;      
      set SASUSER.LOOK(keep=Xa Xb Xc);   
      length _Check_ $ 10 ;     
      if Xa=. then _check_=trim(_Check_)!!" Xa" ;
      if Xb=. then _check_=trim(_Check_)!!" Xb" ;
      if Xc=. then _check_=trim(_Check_)!!" Xc" ;
      put Xa= Xb= Xc= _check_= ;
   run ;      

When is the PUT statement executed?   
A. when the code is submitted      
B. only when the WORK.BAD_DATA view is used
C. both when the code is submitted and the view is used      
D. never, the use of _null_ in a view is a syntax error
(选B)

这两道题中都出现了"View=...",有没有哪位高手能帮俺解释一下"View=..."这个东东??
不解…… 多谢多谢!![em49]
二维码

扫码加我 拉你入群

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

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

关键词:ADVANCE advan VANCE ance Van following because another created

回帖推荐

co_fund 发表于2楼  查看完整内容

In order to create a DATA step view, specify the VIEW= option after the final data set name in the DATA statement. The VIEW= option tells SAS to compile, but not to execute, the source program and to store the compiled code in the input DATA step view that is named in the option. For example, the following statements create a DATA step view named DEPT.A: libname dept 'SAS-library'; data d ...
沙发
co_fund 发表于 2016-2-17 09:50:44 |只看作者 |坛友微信交流群
In order to create a DATA step view, specify the VIEW= option after the final data set name in the DATA statement. The VIEW= option tells SAS to compile, but not to execute, the source program and to store the compiled code in the input DATA step view that is named in the option.

For example, the following statements create a DATA step view named DEPT.A:

libname dept 'SAS-library';

data dept.a / view=dept.a;
   ... more SAS statements ...
run;

Note that if the SAS view exists in a SAS library, and if you use the same member name to create a new view definition, then the old SAS view is overwritten.

Beginning with Version 8, DATA step views retain source statements. You can retrieve these statements using the DESCRIBE statement. The following example uses the DESCRIBE statement in a DATA step view in order to write a copy of the source code to the SAS log:

  1. data view=inventory;
  2.    describe;
  3. run;  
复制代码

Using a DATA step view, you can do the following:

    directly process any file that can be read with an INPUT statement

    read other SAS data sets

    generate data without using any external data sources and without creating an intermediate SAS data file.

Because DATA step views are generated by the DATA step, they can manipulate and manage input data from a variety of sources including data from external files and data from existing SAS data sets. The scope of what you can do with a DATA step view, therefore, is much broader than that of other types of SAS views.
For More Info: http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a001278887.htm
已有 1 人评分学术水平 热心指数 收起 理由
Amandanannn + 1 + 1 精彩帖子

总评分: 学术水平 + 1  热心指数 + 1   查看全部评分

使用道具

藤椅
Amandanannn 发表于 2016-2-17 13:15:30 |只看作者 |坛友微信交流群
co_fund 发表于 2016-2-17 09:50
In order to create a DATA step view, specify the VIEW= option after the final data set name in the D ...
多谢多谢!O(∩_∩)O

使用道具

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

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-2 00:51