A00-211

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?

  1. department = dept II number;
  2. department = left(dept) II number;
  3. department = trim(dept) number;
  4. 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?

  1. Length is 14; value is ‘214 London Dri’.
  2. Length is 14; value is ‘214 London Way’.
  3. Length is 16; value is ‘214 London Drive’.
  4. 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?

  1. 6
  2. 7
  3. 8
  4. (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?

  1. merge work.employee work.salary (fname = name);
  2. merge work.employee work.salary (name = fname);
  3. merge work.employee work.salary (rename = (fname = name));
  4. merge work.employee

Question 10

Which program displays a listing of all data sets in the SASUSER library?

  1. proc contents lib = sasuser.all; run;
  2. proc contents data = sasuser.all; run;
  3. proc contents lib = sasuser._alI_; run;
  4. proc contents data = sasuser._all_; run;