ElearnSAS.com

ElearnSAS.com
SAS Learning Platform

Base SAS 101

The SAS data sets WORK.EMPLOYEE and WORK.SALARY are shown below:
WORK.EMPLOYEE WORK.SALARY
fname age name salary
Bruce 30 Bruce 25000
Dan 40 Bruce 35000
Dan 25000
The following SAS program is submitted:
data work.empdata;

by fname;
totsal + salary;
run;
Which one of the following statements completes the merge of the two data sets by the FNAME variable?
A. merge work.employee
work.salary (fname = name);
B. merge work.employee
work.salary (name = fname);
C. merge work.employee
work.salary (rename = (fname = name));
D. merge work.employee
work.salary (rename = (name = fname));
Click Comment link to get answer

14 comments:

  1. Anonymous8:10 AM

    (rename = (name = fname));

    completes the merge of the two data sets by the FNAME variable

    D

    ReplyDelete
  2. Anonymous1:31 AM

    Correct Answer: D
    Because the two data sets are merged by fname variable. You need to rename the name variable of the salary data set to fname. Correct way to rename is
    (rename = (name = fname))

    ReplyDelete
    Replies
    1. thank you so much.well and short explanation.

      Delete
  3. Anonymous6:29 PM

    I tried to submit the (rename=(fname=name)) too. I found SAS 9.1 works. Log indicates the errors. But out present the correct results.

    anyone please tell me why?

    ReplyDelete
  4. what is the error message you are getting?

    ReplyDelete
  5. Anonymous9:12 AM

    (rename = (original_var_name= new_var_name))

    The original var in this case is name and needs to be renamed fname.

    So D should be the correct answer.

    ReplyDelete
  6. Anonymous12:12 PM

    Thnks; This the way we should answer. Super job.

    (rename = (original_var_name= new_var_name))

    ReplyDelete
  7. Anonymous1:57 PM

    The answer is D.

    ReplyDelete
  8. Anonymous1:59 PM

    D is definately the answer.

    ReplyDelete
  9. isnt fname the old name here...

    ReplyDelete
  10. Anonymous10:11 AM

    SAS mentions I need a minimum of 70% correct to pass the exam, so is it ok if I mark 70% of the questions correct & 30% wrong, will I still be able to pass the test ????

    ReplyDelete
  11. Data science course in Gurgaon is likewise for business people who intend to be a data scientist at entry level or higher. Data science training in Gurgaon is regarded as one of the best data science courses in India. After the successful completion of the Data science course in Gurgaon, the student will be given placement assistance just as job support. Real-time training and project support are two salient features of this course.
    For More Info: Data Science Training in Gurgaon

    ReplyDelete