a) b) o c) d) e) Variables and h c t i o n s Data and instructions Data step and procedure step Data step and variables Data step and Proc Print
data
seasons; SET temps; IF Temperature > 100 THEN ELSE Status = 'Cold' ;
Status
'Hot';
Given the above code and a Temperature value of 67, what would the value of Status be: a) b) c) Cd) e) Hot Cold 99 Col 67
' 0
d)
a) b)
4 Given that the data set named ONE contains 10 observations and the data set named TWO contains 10 observations, how many observations will be contained in the data set named COMBINE that is created in the following DATA step?
data combine; set one two; run;
020
c) d)
0, the DATA step will fail due to syntax errors. 10 to 20, depending on how many observations match.
Given the above merit of code, what value would Name have given the data 'Albert' as input:
4:
el 5
Column only
d) e)
Mixed Standard
9. The fsflowbg SAS program is submitted at the start of a new SAS session:
libname sasdata 'SAS-da t a - l i b r a r y data sasdata. sales; set sasdata.salesdata; profit-expenses-revenues; run# proc print data-sales; run;
';
The SAS data set Sdata.Salesdata has ten observations. Which one of the following explains why a report fails to generate?
&
c)
The DATA step fails execution. SAS data set Sales does not exist. The SAS data set Sales has no observations.
d)
Which one of the following WHERE statements completes the program and selects only observations with a Hire-date of February 23, 20001 where hire_date=23feb20001d; where hiredate='23 febZM)(Y1; where hire_date='O2/23/2000'd; where hire-date='02/23/2000';
c) d)
Which one of the following represents how the observations are sorted? The data set WorkTest is stored in ascending order by both Fname and Salary values. The data set WortTest is stored in descending order by both Fname and Salary values. The data set WorkTest is &wed in descending order by Fname and ascending order by
2ZtZbrk.Test i s& m i in ascending order by Fname and in descending order by Salary values.
f.glCXppunu : a l a p w q $ amu-lsry $ uo!lalaJ lndy f-galap : alapqwq $ amuU1sry $ uo!lalai lndy I.gMppunu alapqnq $ amuUlsry $ uo!)alaJ lndy 1-galapa)epytrIq $ amu-lsn~$ uoyajaJ indu! jsanlv~ alap svs
ifs3> ! s
(a
\
(P
.Molaq pals!~s!
sly QV M ~ J
'El
ilas s v p )n&no aw q uo!s!A!a alqapA ayljo anlar\ ayl q u a s a ~ d %u;r~o(loj a~ ayljo auo 9 3 1 ~ .
~ ~ l l o w i program n g is submitted:
data fitaten; input jobcode' $ salary name $; cards; FLAT1 70000 Bob FLAT2 60000 Joe FLAT3 30090 Ann
I
run; data desc; set fltaten; if salary>60000 then description-'Over 60'; else description='Under 60'; run;
What is value of the variable named description when the value for salary is 300001 (&under 6 b) Under 60 c) Over 60 d) " (Missing character value) e) . (Missing numeric value)
15.
17. A SAS report currently flows over two pages because it is too long to fit within the specified display dimension. Which one of the following actions would change the display dimension so that the report fits on one page?
@r
a) b) c)
Increase the value of the LINEN0 option Decrease the value of the PAGENO option Decrease the value of the LINESIZE option. Increase the value of the PAGESIZE option.
a) b) d)
the program data vector (PDV) the data set descriptor the fmt observation , the -N- automatic variable
14. ,.
i.
run; data desc; set fltaten; if salary>60000 then description='Over 60'; else description='Under 60'; run;
What is value of the variable named description when the value for salary is 30000?
Q ~ h6 r
b) Under 60 c) Over 60 d) ' ' (Missing character value) e) . (Missing numeric value)
*
15.
data work.building; code='DAL523'; code='SANFRAN604'; code='HOUS731'; length code $ 20; run; Which one of the following is the length of the code variable?
17. ' A SAS report currently flows over two pages because it is too long to fit within the specified display dimension. Which one of the following actions would change the display dimension so that the report fits on one page?
@I
18.
a) b) c)
Increase the value of the LINEN0 option Decrease the value of the PAGENO option Decrease the value of the LMESIZE option. Increase the value of the PAGESIZE option.
Which of the following is NOT created at compile time? the program data vector (PDV) the data set descriptor (c'C, the first observation d) the -N- automatic variable a) b)
20.
21.
How many program steps are executed when the program below is processed?
data user.tables; infile jobs; input date name $ job $; run; proc sort data=user.tables;
by m e t
@ zc.
five
d. six
22. Which procedure displays the descriptor portion of a SAS data set?
a)
PROCMEANS
23. Which of t4e following FORMAT procedures is written correctly? a) proc format lib=library value colorfmt; 1= \Redr 2= 'Green1 3= \Bluer run;
11
proc format lib=library; value colorfmt; 1- \Red1 2= 'Greenr 3- \Bluet; run; proc format lib=library; value colorfmt; 1= \Redr . 2= \Green1 3= \Bluer run; proc format lib=library; value colorfmt 1= \Red1; 2= \Greenr; 3= \Blue1; run;
24. What are the final titles resulting fiom the following program?
proc print data=work.march; title1 'The First Liner; title2 'The Second Line' ; run; proc print data=work.march; title \The Top Line1; run;
The First Line The Second Line The Top Line c) The Top Line The Second Line The First Line The Top Line
whi& skmttnt must be added to the following code in order to print only the EmpIDYs and Salaries of the Pilots?
proc print data=ia.empdata noobs; var JobCode EmpID Salary; ( i n s e r t statement here> run;
@,where
Jobbode= VPILOT' ;
26. Which of the following SAS date formats displays the SAS date value for January 16 2002 in the form 16101/2002?
PROCMEANS PROCFREQ
d)
PROC TABULATE
proc print data=ia.empdata noobs; var JobCode EmpID Salary; < i n s e r t statement here> run;
Salary
Which of the,following statements should be added to the program to produce the correct output?
a) where Salary-sum;
0
C)
Column 1-3
1 1
4-1 1
1
I
Which of the following MPUT statements reads the raw data file correctly?
a>
input
. Dest
Flight
Flight $ 1-3 Date $ 4-11 Dest $ 12-14 FirstClass 15-17 Economy 18-20;
c>
input
Flight 1-3 Date 4-11 Dest $ 12-14 FirstClass 15-17 Economy 18-20;
dl
input Flight $ 1-3 Date $ 4-11 Dest 12-14 FirstClass 15-17 Economy 18-20;
title2 'by JobCode'; proc tabulate data=ia.fltat; class Location JobCode; < i n s e r t statement here> run;
What statement must be added to the above code to output the table given below?
The SAS System by JobCode
i .
d) table Location
END OF EXAMINATION
. A
. .'$ I. ,s
'"I