By admin | September 3, 2009

SAS Certified Base Programmer 123 Questions (18)

The SAS data sets WORK.EMPLOYEE and WORK.SALARY are listed below:

WORK.EMPLOYEE
fname age 
Bruce 30 
Dan   40 
WORK.SALARY
fname salary
Bruce 25000
Bruce 35000
Dan   25000

The following SAS program is submitted:

data work.empdata;
    merge work.employee
          work.salary;
    by fname;
    totsal+ salary;
run;

How many variables are output to the WORK.EMPDATA data set?

A. 3
B. 4
C. 5
D. No variables are output to the data set as the program fails to execute due to errors.

8 comments | Add One

  1. admin - 09/3/2009 at 12:51 pm

    B

  2. Praveen - 03/28/2011 at 3:46 am

    Answer should be A.

  3. Sabee - 05/10/2011 at 9:48 pm

    I agree with Praveen

  4. dyan - 05/14/2011 at 6:04 pm

    B is right. b/c the question is how many variables (not obs) in the dataset.

  5. Sudha - 07/26/2011 at 2:39 am

    Ans should be A.

  6. Deepak - 08/11/2011 at 10:27 am

    I agree with Admin.. B

    There will be four variables
    1. fname, 2. age
    3. salary, 4. totsal

  7. Jack - 07/15/2013 at 11:38 pm

    it will be error.

  8. a - 12/7/2014 at 1:09 am

    data WORK.EMPLOYEE;
    input fname $ age;
    cards;
    Bruce 30
    Dan 40
    ;
    data WORK.SALARY;
    input fname$ salary;
    cards;
    Bruce 25000
    Bruce 35000
    Dan 25000
    ;

    data work.empdata;
    merge work.employee
    work.salary;
    by fname;
    totsal+ salary;
    run;

    Try to run this program ans is B

Leave a Comment

Leave a Reply

Your email address will not be published.