Given the SAS data set WORK QTR 1_REVENUE:
destination revenue
YYZ 53634 -
FRA 62129 -
FRA 75962 -
RDU 76254 -
YYZ 82174 -
The following SAS program is submitted:
Answer : B
The following SAS program is submitted:
data numrecords;
infile "˜file specification"™;
[email protected] patient $15.
relative$ [email protected];
if relative = "˜children"™ then
input @54 diagnosis $15. @;
else if relative = "˜parents"™ then
input @28 doctor $15.
clinic $ 44-53
@54 diagnosis $15. @;
input age;
run;
How many raw data records are read during each iteration of the DATA step execution?
Answer : B
Given the SAS data set ONE:
Given the SAS data set WORK.ONE:
Answer : B
After a SAS program is submitted, the following is written to the SAS log:
105 data january;
106 set allmonths(keep = product month num_sold cost);
107 if month = "˜Jan"™ then output january;
108 sales = cost * num_sold;
109 keep = product sales;
------
ERROR 22-322: Syntax error, expecting one of the following:!,
!!, &, *,**, +, -,/, <,< =, <>, =, >, ><, >=,
AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL,
NOTIN, OR,^=,|,II,
110 run;
What changes should be made to the KEEP statement to correct the errors in the LOG?
Answer : A
The following SAS program is submitted:
data combine;
prefix="™505"™;
middle="™6465 "˜;
end="™09090"™;
<insert statement here>;
run;
Which statement successfully completes the program so that TOTAL has a value of 505-6465-
09090?
Answer : B
The following SAS program is submitted:
<insert ODS statement here>
proc means data = sasuser.shoes;
where product in ("˜Sandal"™ , "˜Slipper"™ , "˜Boot"™); run;
<insert ODS statement here>
Which ODS statements complete the program and send the report to an HTML file?
Answer : D
Given the raw data file AMOUNT:
----I---- 10---I----20---I----30
$1,234
The following SAS program is submitted:
data test;
infile "˜amount"™;
[email protected] salary 6.;
if_error_then description = "˜Problems"™;
else description = "˜No Problems"™;
run;
What is the result?
Answer : B
Given the SAS data set PEPM.STUDENTS:
PERM.STUDENTS NAME AGE -
--------- ------ Alfred 14
Alice13 -
Barbara13 -
Carol14 -
The following SAS program is submitted:
libname perm "˜SAS data library"™;
data students;
set perm.students;
file "˜file specification"™;
put name $15. @5 age 2.;
run;
What is written to the output raw data file?
Answer : B
The following SAS program is submitted:
data work.total;
set work.salary(keep = department wagerate);
by department;
if first.department
then payroll = 0;
payroll + wagerate;
if last.department
run;
The SAS data set WORK.SALARY, currently ordered by DEPARTMENT, contains 100 observations for each of 5 departments.
What is the result?
Answer : A
The following SAS program is submitted;
data combine;
country = "˜Italy, Russia, ireland"™;
found = find(country, "˜i"™);
run;
What is the value of the variable FOUND in the output data set?
Answer : B
Given the following code:
proc print data=SASHELP.CLASS(firstobs=5 obs=15);
where Sex='M';
run;
How many observations will be displayed?
Answer : D
The SAS data set named WORK.SALARY contains 10 observations for each department, and is currently ordered by Department. The following SAS program is submitted:
Answer : C
Given the contents of the raw data file TYPECOLOR.DAT:
Answer : D
The following SAS program is submitted:
Answer : A
Given the raw data record in the file phone.txt:
Answer : A