SAS Institute A00-211 - SAS Base Programming for SAS 9 Exam
Page: 2 / 54
Total 270 questions
Question #6 (Topic: Volume A)
Given the raw data record DEPT:
----|----10---|----20---|----30
Printing 750
The following SAS program is submitted:
data bonus;
infile dept;
inputdept$ 1-11 number 13- 15;
<insert statement here>
run;
Which SAS statement completes the program and results in a value of Printing750 for the DEPARTMENT variable?
----|----10---|----20---|----30
Printing 750
The following SAS program is submitted:
data bonus;
infile dept;
inputdept$ 1-11 number 13- 15;
<insert statement here>
run;
Which SAS statement completes the program and results in a value of Printing750 for the DEPARTMENT variable?
A. department = dept II number;
B. department = left(dept) II number;
C. department = trim(dept) number;
D. department=trim(dept)||put(number,3.);
Answer: D
Question #7 (Topic: Volume A)
The following SAS program is submitted:
data one;
addressl = 214 London Way;
run;
data one;
set one;
address = tranwrd(address1, Way, Drive); run;
What are the length and value of the variable ADDRESS?
data one;
addressl = 214 London Way;
run;
data one;
set one;
address = tranwrd(address1, Way, Drive); run;
What are the length and value of the variable ADDRESS?
A. Length is 14; value is ‘214 London Dri’.
B. Length is 14; value is ‘214 London Way’.
C. Length is 16; value is ‘214 London Drive’.
D. Length is 200; value is ‘214 London Drive’.
Answer: D
Question #8 (Topic: Volume A)
The following SAS program is submitted:
data work.sets;
do until (prod gt 6);
prod + 1;
end;
run;
What is the value of the variable PROD in the output data set?
data work.sets;
do until (prod gt 6);
prod + 1;
end;
run;
What is the value of the variable PROD in the output data set?
A. 6
B. 7
C. 8
D. (missing numeric)
Answer: B
Question #9 (Topic: Volume A)
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?
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
Answer: D
Question #10 (Topic: Volume A)
Which program displays a listing of all data sets in the SASUSER library?
A. proc contents lib = sasuser.all; run;
B. proc contents data = sasuser.all; run;
C. proc contents lib = sasuser._alI_; run;
D. proc contents data = sasuser._all_; run;
Answer: D