A00-211 practice questions, page 5 of 11, with answer review and explanations.
Question 21
The following SAS program is submitted: How many observations are written to the WORK.SALES data set?
0
1
5
60
Question 22
The following SAS program is submitted: The program fails execution due to syntax errors. What is the cause of the syntax error?
The variable MONTHSALES does not exist.
An array cannot be referenced on a KEEP data set option.
The KEEP= data set option should be (KEEP = MONTHSALES).
The KEEP= data set option should be the statement KEEP MONTHSALES{12}.
Question 23
Given the SAS data set EMPLOYEES: EMPLOYEES - NAME SALARY - -------- ------------ Innis 60000 - Jolli 50000 - Ellis 55000 - Liu 45000 - The following SAS program is submitted: proc print data = employees; where name like _i%; run; What is contained in the output?
Liu only
Innis and Ellis only
Innis, Ellis, and Liu only
Innis, Jolli, Ellis, and Liu
Question 24
Given the SAS data set ONE: ONE - Obs Dte - ----- -------- 1 09JAN2005 2 12JAN2005 The following SAS program is submitted: data two; set one; day = ; format dte date9.; run; The data set TWO is created: TWO - Obs Dte Day - 1 09JAN2005 1 12 JAN2005 4 Which expression successfully completed the program and created the variable DAY?
day(dte)
weekday(dte)
dayofweek(dte)
datdif(dte,’01jan2005’d,’act/act’)
Question 25
Read the table: Given the SAS data set SASUSER.HOUSES: Obs style bedrooms baths price sqteet street 1 CONDO 2 1.5 80050 1200 MAIN 2 CONDO 3 2.5 79350 1300 ELM 3 CONDO 4 2.5 127150 1400 OAK 4 CONDO 2 2.0 110700 1100 FIFTH 5 TWOSTORY 4 3.0 107250 2100 SECOND 6 TWOSTORY 2 1.0 55650 1600 WEST 7 TWOSTORY 2 1.0 69250 1450 NORTH 6 TWOSTORY 4 2.5 102950 2000 SOUTH The following SAS program is submitted: proc report data = sasuser.houses nowd headline; column style price; where price It 100000; define price / mean width = 9 format = dollar12.; title; run; The following output is desired: style price ------- ------ CONDO $79,700 - TWOSTORY $62550 - Which DEFINE statement completes the program and produces the desired output?