A00-211 SAS Base Programming for SAS 9

Loading demo links...

Showing 10–12 of 15 questions

Question 10 (Volume B)

The following SAS program is submitted:

data stats; set revenue;

array weekly{5} mon tue wed thu fri;

total = weekly{i} * .25; output; end; run;

Which one of the following DO statements completes the program and processes the elements of the WEEKLY array?

Select an option, then click Submit answer.

  • do i = 1 to 5;

  • do weekly{i} = 1 to 5;

  • do i = mon tue wed thu fri;

  • A DO loop cannot be used because the variables referenced do not end in a digit.

Question 11 (Volume A)

The following SAS program is submitted, creating the SAS data set ONE:

data one;

infile ‘file specification’; input num chars$;

run;

ONE

NUM CHAR

------- ---------

1 23

3 23

1 77

The following SAS program is submitted:

proc print data = one; where char = 23; run;

What is output?

Select an option, then click Submit answer.

  • NUM CHAR
    1 77
    2

  • NUM CHAR
    1 23
    3 23

  • NUM CHAR
    1 23
    3 23
    1 77

  • No output is generated.

Question 12 (Volume B)

The following SAS program is submitted:

data work.test; Author = 'Agatha Christie'; First = substr(scan(author,1,' ,'),1,1); run;

Which one of the following is the length of the variable FIRST in the output data set?

Select an option, then click Submit answer.

  • 1

  • 6

  • 15

  • 200