SAS中文论坛

标题: 再请教一个SAS 考试题目 [打印本页]

作者: shiyiming    时间: 2010-7-31 16:29
标题: 再请教一个SAS 考试题目
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.   
  
  
Answer:(C)

个人认为应该是b啊, 句法不知道错在哪里?!
   请指点!谢谢!
作者: shiyiming    时间: 2010-7-31 19:51
标题: Re: 再请教一个SAS 考试题目
From my view, the answer should be B. The knowledge point is VIEW, you should know when the VIEW data would be created and what is VIEW data's advantage.
作者: shiyiming    时间: 2012-7-11 11:40
标题: Re: 再请教一个SAS 考试题目
这里有点奇怪,首先,句法是肯定没错的。提交这个data步后,在work库里只产生了一个temp view,日志窗口也并无内容。但是等打开这个视图(temp dataset以view的方式保存)再关闭它之后,在work库里出现了errors dataset。我觉得B是正确的。在运行这个程序之后没有产生,在用到temp这个视图时自动产生了,同时日志显示相关信息!




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