1.
Given the SAS data set SASDATA TWO:
SASDATA TWO
X Y
-- --
5 2
3 1
5 6
The following SAS program is submitted:
data sasuser.one two sasdata.three;
set sasdata two;
if x = 5 then output sasuser.one;
else output sasdata two;
run;
What is the result?
2.
The following SAS program is submitted:
footnote1 'Sales Report for Last Month';
footnote2 'Selected Products Only';
footnote3 'All Regions';
footnote4 'All Figures in Thousands of Dollars';
proc print data = sasuser.shoes;
footnote2 'All Products';
run;
Which footnote(s) is/are displayed in the report?
3.
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?
4.
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?
5.
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?
6.
Which program displays a listing of all data sets in the SASUSER library?
7.
The following SAS program is submitted:
proc sort data = work.employee;
by descending fname;
proc sort data = work.salary;
by descending fname;
data work.empdata;
merge work.employee
work.salary;
by fname;
run;
Why does the program rail to execute?
8.
Given the following raw data record:
----I----10---I----20---I----30
son Travis,
The following output is desired:
Obs relation firstname

1 son Travis
Which SAS program correctly reads in the raw data?
9.
Given the SAS data set AGES:
AGES
AGE
---------
The variable AGE contains character values. The following SAS program is submitted:
data subset;
set ages;
where age> 12;
run;
How many observations are written out to the data set SUBSET?
10.
Given the SAS data set PRICES:
PRICES
prodid price
K12S 5.10 producttype
NETWORK sales
15 returns
2
B132S 2.34 HARDWARE 300 10
R18KY21.29 SOFTWARE 25 5
3KL8BY 6.37 HARDWARE 125 15
DY65DW 5.60 HARDWARE 45 5
DGTY23 4.55 HARDWARE 67 2
The following SAS program is submitted:
data hware inter soft;
set prices (keep = producttype price);
if price le 5.00;
if producttype = 'HARDWARE' then output HWARE;
else if producttype = 'NETWORK' then output INTER;
else if producttype = 'SOFTWARE' then output SOFT;
run;
How many observations does the HWARE data set contain?