








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









Which two elements does a SAS program have?
a) Variables and h c t i o n s b) Data and instructions o c) Data step and procedure step d) Data step and variables e) Data step and^ Proc^ Print
data seasons; SET temps; IF Temperature > 100 THEN Status = 'Hot'; ELSE Status = 'Cold' ;
Given the above code and a Temperature value of 67, what would the value of Status be:
a) Hot b) Cold c) 99 Cd) Col e) 67
Which of the following is a valid SAS name?
a) Sdatamon b) data#
d) five months data
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;
0 20 c) 0, the DATA step will fail due to syntax errors. d) 10 to 20, depending on how^ many^ observations match.
Length Name $6;
Given the above merit of code, what value would Name have given the data 'Albert' as input:
c) d) None of the above e ) A
The following code is submitted:
data test; average=mean ( 6,4,. ,2 ) ; run;
What is the value of average?.
.(missing numeric value) el 5
The following is an example of. ... (choose one)
data employee; infile 'employee.datl; input id $6. name $20. 1330 locale $10.; run;
d) Mixed e) Standard
f.glCXppunu : a l a p w q $ amu-lsry $ uo!lalaJ lndy (^) (P f-galap : alapqwq $ amuU1sry $ uo!lalai lndy I.gMppunu alapqnq $ amuUlsry $ uo!)alaJ lndy
ifs3>
1-galapa)epytrIq $ amu-lsn~$ uoyajaJ indu! (^) (a \
! unx
' E l
~ ~ l l o w i programn 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. The following SAS program is submitted:
ods html file='newfile.html'; proc print data=sasuser.houses; run; proc means data=sasuser.houses; run; proc freq data=sasuser.shoes; run; ods html close; proc print data-sasuser.shoes;
\ run;
How many PflUL files are created?
14. ,. I following program is submitted:
data fitaten; input jobcode $ salary name $; cards; FLAT1 70000 Bob FLAT2 60000 Joe FLAT3 30000 Ann ; 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 ~ h 6 r b) Under 60 c) Over 60
e). (Missing numeric value)
15. The following SAS program is submitted:
ods html file='newfile.htmll; proc print data=sasuser.houses; run; proc means data=sasuser.houses; run; proc freq data=sasuser.shoes; run; ods html close; proc print data=sasuser.shoes; run;
The following SAS program is submitted:
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?
a) Increase the value of the^ LINEN0^ option b) Decrease the value of the^ PAGENO^ option c) Decrease the value of the^ LMESIZE^ option. @I Increase the value of the PAGESIZE option.
18. Which of the following is NOT created at compile time?
a) the program data vector (PDV) b) the data set descriptor
d) the -N- automatic variable
Which is an example of standard numeric data?
Which of t4e following FORMAT procedures is written correctly? a) proc format lib=library value colorfmt; 1= \Redr 2= 'Green 3= \Bluer run;
proc format lib=library; value colorfmt; 1= \Redr. 2= \Green 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 EmpIDYsand 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' ;
Which of the following SAS date formats displays the SAS date value for January 16 2002 in the form 1610 1/2002?
Which of the following procedures is NOT a report writing procedure?
a) PROCMEANS
b) PROCFREQ
d) PROC TABULATE
A raw data file, dfwlax. dat , is listed below
Destination 1 12- First Class 1 15-17 1
Description Flight number Date
I Economv 1 18-20 I
Column 1- 4-1 1
The following program is submitted using the above file as input:
data work.dfwlax; infile 'dfwlax.dat';
run;
a> input
c> input
dl input
Flight 1-3 Date 4-
. Dest 12-14 Firstclass 15- Economy 18-20;
Flight $ 1-3 Date $ 4- Dest $ 12-14 FirstClass 15- Economy 18-20;
Flight 1-3 Date 4- Dest $ 12-14 FirstClass 15- Economy 18-20;
Flight $ 1-3 Date $ 4- Dest 12-14 FirstClass 15- Economy 18-20;
title2 'by JobCode'; proc tabulate data=ia.fltat; class Location JobCode; <in 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
a) table JobCode Location;
b) table Location, JobCode;
c g t a b l e JobCode, Location;
d) table Location JobCode;
. .A '"I .'$