标题: SAS advance exam question 5: Data step [打印本页] 作者: shiyiming 时间: 2010-6-10 23:13 标题: SAS advance exam question 5: Data step 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.
Why the correct answer is C? Thanks in advance.
^_^作者: shiyiming 时间: 2010-6-11 10:18 标题: Re: SAS advance exam question 5: Data step Unfortunately C is not the right answer. Remember that when you submit the code, a pre-compiled data step is created but not executed.作者: shiyiming 时间: 2010-6-12 04:34 标题: Re: SAS advance exam question 5: Data step After review the Data Step Processing, I choose D as the answer.
DATA step is consisted of two phase: compilation phase and execution phase.
^_^作者: shiyiming 时间: 2010-6-12 09:12 标题: Re: SAS advance exam question 5: Data step B seems to be the most appropriate one.作者: shiyiming 时间: 2010-6-13 08:26 标题: Re: SAS advance exam question 5: Data step Would you please give me more details about the reasons why B should be the most appropriate answer?作者: shiyiming 时间: 2010-6-13 19:32 标题: Re: SAS advance exam question 5: Data step 1. If RAWDATA exists, there is no syntax error.
2. After a data step view is submitted a view is created.
data _test_ _out_ /view=_test_;
x=1;
run;
proc datasets lib=work nolist;
contents data=_all_ nods;
run;
3. After the view is called the data set _out_ is created.
data _null_;
set _test_;
run;
--作者: shiyiming 时间: 2012-7-11 16:00 标题: Re: SAS advance exam question 5: Data step [quote="ergoudan":1l1gn31p]1. If RAWDATA exists, there is no syntax error.
2. After a data step view is submitted a view is created.
data _test_ _out_ /view=_test_;
x=1;
run;
proc datasets lib=work nolist;
contents data=_all_ nods;
run;
3. After the view is called the data set _out_ is created.
data _null_;
set _test_;
run;