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.
Topics:
SAS Base Questions |
8 Comments »
B
Answer should be A.
I agree with Praveen
B is right. b/c the question is how many variables (not obs) in the dataset.
Ans should be A.
I agree with Admin.. B
There will be four variables
1. fname, 2. age
3. salary, 4. totsal
it will be error.
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