全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
3104 2
2016-02-17
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]
二维码

扫码加我 拉你入群

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

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

全部回复
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:

复制代码

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
二维码

扫码加我 拉你入群

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

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

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
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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