run;
What value will SAS assign to Pos?
A. 0 B. 1 C. 2 D. 12
Answer: D
------------------------------------------------------------------ 43.Given the SAS data set WORK.ORDERS:
WORK.ORDERS
order_id customer shipped -------- ------------ ---------
9341 Josh Martin 02FEB2009 9874 Rachel Lords 14MAR2009 10233 Takashi Sato 07JUL2009
The variable order_id is numeric; customer is character; and shipped is numeric, contains a SAS date value, and is shown with the DATE9. format.
A programmer would like to create a new variable, ship_note, that shows a character value with the order_id,shipped date, and customer name.
For example, given the first observation ship_note would have the value \shipped on 02FEB2009 to Josh Martin\
Which of the following statement will correctly create the value and assign it to ship_note?
A. ship_note=catx(' ','Order',order_id,'shipped on',input(shipped,date9.),'to',customer);
B. ship_note=catx(' ','Order',order_id,'shipped on',char(shipped,date9.),'to',customer);
C. ship_note=catx(' ','Order',order_id,'shipped on',transwrd(shipped,date9.),'to',customer);
D. ship_note=catx(' ','Order',order_id,'shipped on',put(shipped,date9.),'to',customer);
Answer: D
------------------------------------------------------------------
44.The following SAS program is submitted:
data ONE TWO SASUSER.TWO set SASUSER.ONE; run;
Assuming that SASUSER.ONE exists, how many temporary and permanent SAS data sets are created?
A. 2 temporary and 1 permanent SAS data sets are created B. 3 temporary and 2 permanent SAS data sets are created C. 2 temporary and 2 permanent SAS data sets are created D. there is an error and no new data sets are created
Answer: D
------------------------------------------------------------------
45.The following SAS program is submitted:
ods csvall file='c:\\test.cvs'; proc print data=WORK.ONE; var Name Score Grade; by IdNumber; run;
ods csvall close;
What is produced as output?
A. A file named test.cvs that can only be opened in Excel.
B. A text file named test.cvs that can be opened in Excel or in any text editor. C. A text file named test.cvs that can only be opened in a text editor. D. A file named test.cvs that can only be opened by SAS.
Answer: C
------------------------------------------------------------------
46.Given the SAS data set WORK.ONE:
Obs Revenue2008 Revenue2009 Revenue2010 --- ----------- ----------- -----------
1 1.2 1.6 2.0
The following SAS program is submitted:
data WORK.TWO; set WORK.ONE; Total=mean(of Rev:); run;
What value will SAS assign to Total?
A. 3 B. 1.6 C. 4.8
D. The program fails to execute due to errors.
Answer: B
------------------------------------------------------------------
47.The following output is created by the FREQUENCY procedure:
The FREQ Procedure
Table of region by product
region product
Frequency| Percent | Row Pct |
Col Pct |corn |cotton |oranges | Total ---------+--------+--------+--------+
EAST | 2 | 1 | 1 | 4 | 22.22 | 11.11 | 11.11 | 44.44 | 50.00 | 25.00 | 25.00 | | 50.00 | 33.33 | 50.00 | ---------+--------+--------+--------+
SOUTH | 2 | 2 | 1 | 5 | 22.22 | 22.22 | 11.11 | 55.56 | 40.00 | 40.00 | 20.00 | | 50.00 | 66.67 | 50.00 | ---------+--------+--------+--------+
Total 4 3 2 9 44.44 33.33 22.22 100.00
Which TABLES option(s) would be used to eliminate the row and column counts and just see the frequencies and percents?
A. norowcount nocolcount B. freq percent C. norow nocol D. nocounts
Answer: C
------------------------------------------------------------------
48.The following SAS program is submitted:
data WORK.TEST; drop City;
infile datalines; input
Name $ 1-14 / Address $ 1-14 / City $ 1-12 ;
if City='New York ' then input @1 State $2.; else input; datalines; Joe Conley 123 Main St. Janesville WI
Jane Ngyuen 555 Alpha Ave. New York NY
Jennifer Jason 666 Mt. Diablo Eureka CA ;
What will the data set WORK.TEST contain?
A.
Name Address State -------------- ---------------- ------ Joe Conley 123 Main St.
Jane Ngyuen 555 Alpha Ave. NY Jennifer Jason 666 Mt. Diablo
B.
Name Address City State -------------- ---------------- ----------- ------ Joe Conley 123 Main St. Janesville
Jane Ngyuen 555 Alpha Ave. New York NY Jennifer Jason 666 Mt. Diablo Eureka
C.
Name Address State -------------- ---------------- ------
Jane Ngyuen 555 Alpha Ave. NY
D. O observations,there is a syntax error in the data step.
Answer: A
------------------------------------------------------------------
49.The following SAS program is submitted:
data WORK.TOTALSALES(keep=MonthSales{12});
set WORK.MONTHLYSALES(keep=Year Product Sales); array MonthSales{12}; do i=1 to 12;
MonthSales{i}=Sales; end; drop i; run;
The program fails execution due to syntax errors. What is the cause of the syntax error?
A. An array cannot be referenced on a keep= data set option. B. The keep= data set option should be (keep=MonthSales*).
C. The keep= data set option should be the statement KEEP MonthSales{12}. D. The variable MonthSales does not exist.
Answer: A
------------------------------------------------------------------
50.Given the SAS data set WORK.ONE:
Id Char1 --- ----- 111 A