ElearnSAS.com

ElearnSAS.com
SAS Learning Platform

Base SAS 97

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

16 comments:

  1. Anonymous8:33 AM

    'D'

    ReplyDelete
  2. ani,,5:59 PM

    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

    ReplyDelete
  3. Anonymous10:59 AM

    Dear SaS exam preparer;
    Please 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

    ReplyDelete
    Replies
    1. 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.

      Delete
  4. Anonymous8:56 AM

    it is A. copy is used to transfer one file to another liabrary.

    ReplyDelete
  5. Anonymous3:57 AM

    I didn't find copy as a valid SAS statement

    ReplyDelete
  6. Anonymous3:03 AM

    COPY statement exists in SAS.
    However, it cannot be used inside a Data step so A is not a correct answer. D is the correct one.
    Another Anonymous

    ReplyDelete
  7. Anonymous2:20 PM

    COPY statement cannot be used in datastep. It is used in a proc step as follow:
    proc copy in=work out=sasuser;
    select datasetname;
    run;
    -Naveen

    ReplyDelete
  8. Itogaman1:41 PM

    Answer is 'D'

    ReplyDelete