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?
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?
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?
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?
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?
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?
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?
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?