A00-211 practice questions, page 2 of 11, with answer review and explanations.
Question 6
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; run; Which SAS statement completes the program and results in a value of Printing750 for the DEPARTMENT variable?
department = dept II number;
department = left(dept) II number;
department = trim(dept) number;
department=trim(dept)||put(number,3.);
Question 7
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?
Length is 14; value is ‘214 London Dri’.
Length is 14; value is ‘214 London Way’.
Length is 16; value is ‘214 London Drive’.
Length is 200; value is ‘214 London Drive’.
Question 8
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?
6
7
8
(missing numeric)
Question 9
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?