Which one of the following SAS DATA steps saves the temporary data set named MYDATA as a permanent data set?
A. libname sasdata 'SAS-data-library';
data sasdata.mydata;
copy mydata;
run;
B. libname sasdata 'SAS-data-library';
data sasdata.mydata;
keep mydata;
run;
C. libname sasdata 'SAS-data-library';
data sasdata.mydata;
save mydata;
run;
D. libname sasdata 'SAS-data-library';
data sasdata.mydata;
set mydata;
run;
Click Comment link to get answer
'D'
ReplyDeleteD
ReplyDeleted
ReplyDeletevenkat
ReplyDeleteans is 'd'
is it D? i think its A. 'copy' is used to create parmanent data set or to trasfer one file to another library.. so i think its A
ReplyDeleteDear SaS exam preparer;
ReplyDeletePlease do not confuse us, did you try if it works ? Then give us the detail info so we would be clear in out mind what exactly it works and why it works. If we confuse here then we are our own at the exam.
You understand me right. Do not pass confusing statements, put it sas program and copy the program and your output too.
thanks
sakar60
Learning how to take exams is as important as the information in them. As you look at all the possible answers - from the place where we are at this point, "keep" and "copy" have not been introduced. And do not really make sense to go extra steps for such a basic function as taking a temp dataset and making it perm. So if I did not know exactly, I could deduce that the code that represents what we have most recently covered would be my best guess - and knowing the function of making a temp dataset perm is very common and/or necessary, using this kind of logic will help deduce from mult choice which answer is correct.
Deleteit is A. copy is used to transfer one file to another liabrary.
ReplyDeleteD
ReplyDeleted
ReplyDeleteI didn't find copy as a valid SAS statement
ReplyDeleteCOPY statement exists in SAS.
ReplyDeleteHowever, it cannot be used inside a Data step so A is not a correct answer. D is the correct one.
Another Anonymous
COPY statement cannot be used in datastep. It is used in a proc step as follow:
ReplyDeleteproc copy in=work out=sasuser;
select datasetname;
run;
-Naveen
Answer is 'D'
ReplyDeleteD
ReplyDeleteD
ReplyDelete