Anda di halaman 1dari 162

1. The following SAS program is submitted: data test; set sasuser.employees; if 2 le years_service le 1 then amount !

1 ; else if years_service gt 1 then amount ! 2 ; else amount ! ; amount_per_year ! years_service " amount; run; #hich one of the following values does the variable A$%&'T_()*_+)A* contain if an employee has been with the company for one year, A. -. 1 .. 2 /. . 0missing numeric value1 Ans: / 2. The contents of the raw data file A$%&'T are listed below: 222222221 22222222 22222223 415236 The following SAS program is submitted: data test; infile 7amount7; input 81 salary 9.; if _error_ then description ! 7(roblems7; else description ! 7'o (roblems7; run; #hich one of the following is the value of the /)S.*:(T:%' variable, A. (roblems -. 'o (roblems .. 7 7 0missing character value1 /. The value can not be determined as the program fails to e;ecute due to errors. Ans: A 3. The contents of the raw data file 'A$)'&$ are listed below: 222222221 22222222 22222223 <oe ;; The following SAS program is submitted: data test;

infile 7namenum7; input name 4 number; run; #hich one of the following is the value of the '&$-)* variable, A. ;; -. <oe .. . 0missing numeric value1 /. The value can not be determined as the program fails to e;ecute due to errors. Ans: c 6. The contents of the raw data file A$%&'T are listed below: 222222221 22222222 22222223 415236 The following SAS program is submitted: data test; infile 7amount7; input 81 salary 9.; run; #hich one of the following is the value of the SA=A*+ variable, A. 1236 -. 15236 .. 415236 /. . 0missing numeric value1 Ans: d >. #hich one of the following statements is true regarding the SAS automatic _)**%*_ variable, A. The _)**%*_ variable contains the values 7%'7 or 7%??7. -. The _)**%*_ variable contains the values 7T*&)7 or 7?A=S)7. .. The _)**%*_ variable is automatically stored in the resulting SAS data set. /. The _)**%*_ variable can be used in e;pressions or calculations in the /ATA step. Ans: d 9. #hich one of the following is true when SAS encounters a data error in a /ATA step, A. The /ATA step stops e;ecuting at the point of the error5 and no SAS data set is created. -. A note is written to the SAS log e;plaining the error5 and the /ATA step continues to e;ecute. .. A note appears in the SAS log that the incorrect data record was saved to a separate SAS file for further e;amination. /. The /ATA step stops e;ecuting at the point of the error5 and the resulting /ATA set contains observations up to that point.

Ans: b @. The following SAS program is submitted: data worA.totalsales 0Aeep ! monthsalesB12C 1; set worA.monthlysales 0Aeep ! year product sales1; array monthsales B12C ; do i!1 to 12; monthsalesBiC ! sales; end; run; The data set named #%*D.$%'TE=+SA=)S has one observation per month for each of five years for a total of 9 observations. #hich one of the following is the result of the above program, A. The program fails e;ecution due to data errors. -. The program fails e;ecution due to synta; errors. .. The program e;ecutes with warnings and creates the #%*D.T%TA=SA=)S data set. /. The program e;ecutes without errors or warnings and creates the #%*D.T%TA=SA=)S data set. Ans: b F. The following SAS program is submitted: data worA.totalsales; set worA.monthlysales0Aeep ! year product sales1; retain monthsales B12C ; array monthsales B12C ; do i ! 1 to 12; monthsalesBiC ! sales; end; cnt G 1; monthsalesBcntC ! sales; run; The data set named #%*D.$%'TE=+SA=)S has one observation per month for each of five years for a total of 9 observations. #hich one of the following is the result of the above program, A. The program fails e;ecution due to data errors. -. The program fails e;ecution due to synta; errors. .. The program runs with warnings and creates the #%*D.T%TA=SA=)S data set with 9 observations. /. The program runs without errors or warnings and creates the #%*D.T%TA=SA=)S data set with 9 observations. Ans: b H. The following SAS program is submitted: data worA.Ianuary;

set worA.allmonths 0Aeep ! product month num_sold cost1; if month ! 7<an7 then output worA.Ianuary; sales ! cost J num_sold; Aeep ! product sales; run; #hich variables does the #%*D.<A'&A*+ data set contain, A. (*%/&.T and SA=)S only -. (*%/&.T5 $%'TE5 '&$_S%=/ and .%ST only .. (*%/&.T5 SA=)S5 $%'TE5 '&$_S%=/ and .%ST only /. An incomplete output data set is created due to synta; errors. Ans: d 1 . The contents of the raw data file .A=)'/A* are listed below: 222222221 22222222 22222223 1 12 The following SAS program is submitted: data test; infile 7calendar7; input 81 date mmddyy1 .; if date ! 7 1 12 7d then event ! 7<anuary 1st7; run; #hich one of the following is the value of the )K)'T variable, A. 1 12 -. <anuary 1st .. . 0missing numeric value1 /. The value can not be determined as the program fails to e;ecute due to errors. Ans: d 11. A SAS program is submitted and the following SAS log is produced: 2 data gt1 ; 3 set ia.airplanes 6 if mpg gt 1 then output; 22 2 2 )**%*: ?ile #%*D.:?./ATA does not e;ist. )**%*: ?ile #%*D.$(L./ATA does not e;ist. )**%*: ?ile #%*D.LT./ATA does not e;ist. )**%*: ?ile #%*D.TE)'./ATA does not e;ist. )**%*: ?ile #%*D.%&T(&T./ATA does not e;ist. )**%* 222322: Synta; error5 e;pecting one of the following: a name5 a Muoted string5 05 ;5 )'/5 D)+5 D)+S5 '%-S5 %()'5 (%:'T5 _/ATA_5 _=AST_5 _'&==_. )**%* 2 22322: The option or parameter is not recogniNed and will be ignored. > run; The :A libref was previously assigned in this SAS session.

#hich one of the following corrects the errors in the =%L, A. /elete the word TE)' on the :? statement. -. Add a semicolon at the end of the S)T statement. .. (lace Muotes around the value on the :? statement. /. Add an )'/ statement to conclude the :? statement. Ans: b 12. The contents of the raw data file S:O) are listed below: 222222221 22222222 22222223 @2 H> The following SAS program is submitted: data test; infile 7siNe7; input 81 height 2. 86 weight 2; run; #hich one of the following is the value of the variable #):LET in the output data set, A. 2 -. @2 .. H> /. . 0missing numeric value1 Ans: a 13. A SAS (*:'T procedure output of the #%*D.=)K)=S data set is listed below: %bs name level 1 ?ranA 1 2 <oan 2 3 Sui 2 6 <ose 3 > -urt 6 9 Delly . @ <uan 1 The following SAS program is submitted: data worA.e;pertise; set worA.levels; if level ! . then e;pertise ! 7&nAnown7; else if level ! 1 then e;pertise ! 7=ow7; else if level ! 2 or 3 then e;pertise ! 7$edium7; else e;pertise ! 7Eigh7; run; #hich of the following values does the variable )P()*T:S) contain,

A. =ow5 $edium5 and Eigh only -. =ow5 $edium5 and &nAnown only .. =ow5 $edium5 Eigh5 and &nAnown only /. =ow5 $edium5 Eigh5 &nAnown5 and 7 7 0missing character value1 Ans: b 16. The contents of the raw data file )$(=%+)) are listed below: 222222221 22222222 22222223 *uth 3H 11 <ose 32 22 Sue 3 33 <ohn 6 66 The following SAS program is submitted: data test; infile 7employee7; input employee_name 4 126; if employee_name ! 7*uth7 then input idnum 1 211; else input age @2F; run; #hich one of the following values does the variable :/'&$ contain when the name of the employee is Q*uthQ, A. 11 -. 22 .. 32 /. . 0missing numeric value1 Ans: d 1>. The contents of the raw data file )$(=%+)) are listed below: 222222221 22222222 22222223 *uth 3H 11 <ose 32 22 Sue 3 33 <ohn 6 66 The following SAS program is submitted: data test; infile 7employee7; input employee_name 4 126; if employee_name ! 7Sue7 then input age @2F; else input idnum 1 211; run; #hich one of the following values does the variable AL) contain when the name of the employee is QSueQ, A. 3 -. 33

.. 6 /. . 0missing numeric value1 Ans: d 19. The following SAS program is submitted: libname sasdata 7SAS2data2library7; data test; set sasdata.chemists; if Iobcode ! 7.hem27 then description ! 7Senior .hemist7; else description ! 7&nAnown7; run; A value for the variable <%-.%/) is listed below: <%-.%/) chem2 #hich one of the following values does the variable /)S.*:(T:%' contain, A. .hem2 -. &nAnown .. Senior .hemist /. 7 7 0missing character value1 Ans: b 1@. The following SAS program is submitted: libname sasdata 7SAS2data2library7; data test; set sasdata.chemists; if Iobcode ! 7chem37 then description ! 7Senior .hemist7; else description ! 7&nAnown7; run; A value for the variable <%-.%/) is listed below: <%-.%/) .E)$3 #hich one of the following values does the variable /)S.*:(T:%' contain, A. chem3 -. &nAnown .. Senior .hemist /. 7 7 0missing character value1 Ans: b 1F. #hich one of the following %/S statement options terminates output being written to an ET$= file, A. )'/

-. R&:T .. ST%( /. .=%S) Ans: d 1H. The following SAS program is submitted: proc means data ! sasuser.shoes; where product in 07Sandal7 5 7Slipper7 5 7-oot71; run; #hich one of the following %/S statements completes the program and sends the report to an ET$= file, A. ods html ! 7sales.html7; -. ods file ! 7sales.html7; .. ods file html ! 7sales.html7; /. ods html file ! 7sales.html7; Ans: d 2 . The following SAS program is submitted: proc format; value score 1 2 > ! 7?ail7 >1 2 1 ! 7(ass7; run; proc report data ! worA.courses nowd; column e;am; define e;am " display format ! score.; run; The variable )PA$ has a value of > .>. Eow will the )PA$ variable value be displayed in the *)(%*T procedure output, A. ?ail -. (ass .. > .> /. . 0missing numeric value1 Ans: c 21. The following SAS program is submitted: options pageno ! 1; proc print data ! sasuser.houses; run; proc means data ! sasuser.shoes; run; The report created by the (*:'T procedure step generates > pages of output. #hat is the page number on the first page of the report generated by the $)A'S

procedure step, A. 1 -. 2 .. > /. 9 Ans: d 22. #hich one of the following SAS system options displays the time on a report, A. T:$) -. /AT) .. T%/A+ /. /AT)T:$) Ans: b 23. #hich one of the following SAS system options prevents the page number from appearing on a report, A. '%'&$ -. '%(AL) .. '%'&$-)* /. '%(AL)'&$ Ans: c 26. The following SAS program is submitted: footnote1 7Sales *eport for =ast $onth7; footnote2 7Selected (roducts %nly7; footnote3 7All *egions7; footnote6 7All ?igures in Thousands of /ollars7; proc print data ! sasuser.shoes; footnote2 7All (roducts7; run; #hich one of the following contains the footnote te;t that is displayed in the report, A. All (roducts -. Sales *eport for =ast $onth All (roducts .. All (roducts All *egions All ?igures in Thousands of /ollars /. Sales *eport for =ast $onth All (roducts All *egions All ?igures in Thousands of /ollars Ans: b

2>. The following SAS program is submitted: proc means data ! sasuser.houses std mean ma;; var sMfeet; run; #hich one of the following is needed to display the standard deviation with only two decimal places, A. Add the option $AP/). ! 2 to the $)A'S procedure statement. -. Add the statement $AP/). ! @.2; in the $)A'S procedure step. .. Add the statement ?%*$AT ST/ @.2; in the $)A'S procedure step. /. Add the option ?%*$AT ! @.2 option to the $)A'S procedure statement. Ans: a 29. &nless specified5 which variables and data values are used to calculate statistics in the $)A'S procedure, A. non2missing numeric variable values only -. missing numeric variable values and non2missing numeric variable values only .. non2missing character variables and non2missing numeric variable values only /. missing character variables5 non2missing character variables5 missing numeric variable values5 and non2missing numeric variable values Ans: a 2@. The following SAS program is submitted: proc sort data ! sasuser.houses out ! houses; by style; run; proc print data ! houses; run; .licA on the );hibit button to view the report produced. style bedrooms baths price .%'/% 2 1.> F > 3 2.> @H3> 6 2.> 12@1> 2 2. 11 @ *A'.E 2 1. 96 3 3. F99> 3 1. FH1 1 1. 36>> S(=:T 1 1. 9>F> 6 3. H66> 3 1.> @39> T#%ST%*+ 6 3. 1 @2>

2 1. >>F> 2 1. 9H2> 6 2.> 1 2H> #hich of the following SAS statement0s1 create0s1 the report, A. id style; -. id style; var style bedrooms baths price; .. id style; by style; var bedrooms baths price; /. id style; by style; var style bedrooms baths price; Ans: c 2F. A realtor has two customers. %ne customer wants to view a list of homes selling for less than 49 5 . The other customer wants to view a list of homes selling for greater than 41 5 . Assuming the (*:.) variable is numeric5 which one of the following (*:'T procedure steps will select all desired observations, A. proc print data ! sasuser.houses; where price lt 9 ; where price gt 1 ; run; -. proc print data ! sasuser.houses; where price lt 9 or price gt 1 ; run; .. proc print data ! sasuser.houses; where price lt 9 and price gt 1 ; run; /. proc print data ! sasuser.houses; where price lt 9 or where price gt 1 ; run; Ans: b 2H. The value 11 @ is stored in a numeric variable. #hich one of the following SAS formats is used to display the value as 411 5@ report, A. commaF.2 -. comma11.2 .. dollarF.2 /. dollar11.2 Ans: d . in a

3 . The SAS data set SAS&S)*.E%&S)S contains a variable (*:.) which has been assigned a permanent label of QAsAing (riceQ. #hich one of the following SAS programs temporarily replaces the label QAsAing (riceQ with the label QSale (riceQ in the output, A. proc print data ! sasuser.houses; label price ! QSale (riceQ; run; -. proc print data ! sasuser.houses label; label price QSale (riceQ; run; .. proc print data ! sasuser.houses label; label price ! QSale (riceQ; run; /. proc print data ! sasuser.houses label ! QSale (riceQ; run; Ans: c 31. The SAS data set -A'DS is listed below: -A'DS name rate ?irst.apital . @1F /irect-anA . @21 Kirtual/irect . @2F The following SAS program is submitted: data newbanA; do year ! 1 to 3; set banAs; capital G > ; end; run; #hich one of the following represents how many observations and variables will e;ist in the SAS data set ')#-A'D, A. observations and variables -. 1 observations and 6 variables .. 3 observations and 3 variables /. H observations and 2 variables Ans: b 32. The following SAS program is submitted: data worA.clients; calls ! 9; do while 0calls le 91; calls G 1; end;

run; #hich one of the following is the value of the variable .A==S in the output data set, A. 6 -. > .. 9 /. @ Ans: d 33. The following SAS program is submitted: data worA.pieces; do while 0n lt 91; n G 1; end; run; #hich one of the following is the value of the variable ' in the output data set, A. 6 -. > .. 9 /. @ Ans: c 36. The following SAS program is submitted: data worA.sales; do year ! 1 to >; do month ! 1 to 12; ; G 1; end; end; run; #hich one of the following represents how many observations are written to the #%*D.SA=)S data set, A. -. 1 .. > /. 9 Ans: b 3>. A raw data record is listed below: 222222221 22222222 22222223 1HHH"1 "2> The following SAS program is submitted: data proIectduration; infile 7file2specification7;

input date 4 1 2 1 ; run; #hich one of the following statements completes the program above and computes the duration of the proIect in days as of today7s date, A. duration ! today0 1 2 put0date5ddmmyy1 .1; -. duration ! today0 1 2 put0date5yymmdd1 .1; .. duration ! today0 1 2 input0date5ddmmyy1 .1; /. duration ! today0 1 2 input0date5yymmdd1 .1; Ans: d 39. A raw data record is listed below: 222222221 22222222 22222223 (rinting @> The following SAS program is submitted: data bonus; infile 7file2specification7; input dept 4 1 2 11 number 13 2 1>; run; #hich one of the following SAS statements completes the program and results in a value of 7(rinting@> 7 for the /)(A*T$)'T variable, A. department ! trim0dept1 number; -. department ! dept input0number53.1; .. department ! trim0dept1 SS put0number53.1; /. department ! input0dept511.1 SS input0number53.1; Ans: c 3@. The following SAS program is submitted: data worA.month; date ! put0713mar2 7d5ddmmyy1 .1; run; #hich one of the following represents the type and length of the variable /AT) in the output data set, A. numeric5 F bytes -. numeric5 1 bytes .. character5 F bytes /. character5 1 bytes Ans: d

3F. The following SAS program is submitted: data worA.products; (roduct_'umber ! >691; :tem ! 71 17; :tem_*eference ! :tem7"7(roduct_'umber; run; #hich one of the following is the value of the variable :T)$_*)?)*)'.) in the output data set, A. 1 1">691 -. 1 1" >691 .. . 0missing numeric value1 /. The value can not be determined as the program fails to e;ecute due to errors. Ans: d 3H. The following SAS program is submitted: data worA.retail; cost ! 72 7; total ! .1 J cost; run; #hich one of the following is the value of the variable T%TA= in the output data set, A. 2 -. 72 7 .. . 0missing numeric value1 /. 7 7 0missing character value1 Ans: a 6 . #hich one of the following SAS statements correctly computes the average of four numerical values, A. average ! mean0num1 2 num61; -. average ! mean0of num1 2 num61; .. average ! mean0of num1 to num61; /. average ! mean0num1 num2 num3 num61; Ans: b 61. The following SAS program is submitted: data worA.test; Author ! 7Agatha .hristie7; ?irst ! substr0scan0author5157 57151511; run; #hich one of the following is the length of the variable ?:*ST in the output data set, A. 1 -. 9

.. 1> /. 2 Ans: d 62. The following SAS program is submitted: data worA.test; Author ! 7.hristie5 Agatha7; ?irst ! substr0scan0author5257 57151511; run; #hich one of the following is the value of the variable ?:*ST in the output data set, A. A -. . .. Agatha /. 7 7 0missing character value1 Ans: a 63. The following SAS program is submitted: data worA.test; Title ! 7A Tale of Two .ities5 .harles <. /icAens7; #ord ! scan0title5357 571; run; #hich one of the following is the value of the variable #%*/ in the output data set, A. T -. of .. /icAens /. 7 7 0missing character value1 Ans: b 66. The following SAS program is submitted: data worA.test; ?irst ! 7:pswich5 )ngland7; .ity_.ountry ! substr0?irst515@1TT75 7TT7)ngland7; run; #hich one of the following is the length of the variable .:T+_.%&'T*+ in the output data set, A. 9 -. @ .. 1@ /. 2> Ans: d 6>. The following SAS program is submitted: data worA.test;

?irst ! 7:pswich5 )ngland7; .ity ! substr0?irst515@1; .ity_.ountry ! .ityTT75 7TT7)ngland7; run; #hich one of the following is the value of the variable .:T+_.%&'T*+ in the output data set, A. :pswichTT -. :pswich5 )ngland .. :pswich5 7)ngland7 /. :pswich 5 )ngland Ans: d 69. #hich one of the following is true of the *)TA:' statement in a SAS /ATA step program, A. :t can be used to assign an initial value to _'_ . -. :t is only valid in conIunction with a S&$ function. .. :t has no effect on variables read with the S)T5 $)*L) and &(/AT) statements. /. :t adds the value of an e;pression to an accumulator variable and ignores missing values. Ans: c or d 6@. A raw data file is listed below: 222222221 22222222 22222223 1H 1 2 1H > 1 1H1 9 1H2> . 1H61 1 The following SAS program is submitted and references the raw data file above: data coins; infile 7file2specification7; input year Muantity; run; #hich one of the following completes the program and produces a non2missing value for the variable T%TR&A'T:T+ in the last observation of the output data set, A. totMuantity G Muantity; -. totMuantity ! sum0totMuantity G Muantity1; .. totMuantity ; sum totMuantity; /. retain totMuantity ; totMuantity ! totMuantity G Muantity;

Ans: a 6F. A raw data file is listed below: 222222221 22222222 22222223 sMuash 1.1 apples 2.2> Iuice 1.9H The following SAS program is submitted using the raw data file above: data groceries; infile 7file2specification7; input item 4 cost; run; #hich one of the following completes the program and produces a grand total for all .%ST values, A. grandtot ! sum cost; -. grandtot ! sum0grandtot5cost1; .. retain grandtot ; grandtot ! sum0grandtot5cost1; /. grandtot ! sum0grandtot5cost1; output grandtot; Ans: c 6H. The following SAS program is submitted: data worA.total; set worA.salary0Aeep ! department wagerate1; by department; if first.department then payroll ! ; payroll G wagerate; if last.department; run; The SAS data set #%*D.SA=A*+5 currently ordered by /)(A*T$)'T5 contains 1 observations for each of > departments. #hich one of the following represents how many observations the #%*D.T%TA= data set contains, A. > -. 2 .. 1 /. > Ans: a > . The following SAS program is submitted: data worA.total; set worA.salary0Aeep ! department wagerate1;

by department; if first.department then payroll ! ; payroll G wagerate; if last.department; run; The SAS data set named #%*D.SA=A*+ contains 1 observations for each department5 currently ordered by /)(A*T$)'T. #hich one of the following is true regarding the program above, A. The -+ statement in the /ATA step causes a synta; error. -. ?:*ST./)(A*T$)'T and =AST./)(A*T$)'T are variables in the #%*D.T%TA= data set. .. The values of the variable (A+*%== represent the total for each department in the #%*D.SA=A*+ data set. /. The values of the variable (A+*%== represent a total for all values of #AL)*AT) in the #%*D.SA=A*+ data set. Ans: d or c 51. The following SAS program is submitted: libname sasdata 'SAS-data-library'; data test; set sasdata.chemists !eep " #ob$code%; if #ob$code " 'chem&' then description " 'Senior 'hemist'; run; The (ariable )*+$'*,- is a character (ariable with a length of . bytes. /hich one of the following is the length of the (ariable ,-S'012T1*3 in the output data set4 A. . bytes +. 5 bytes '. 16 bytes ,. 788 bytes Ans: c

57. The following SAS program is submitted: data wor!.accounting; set wor!.dept1 wor!.dept7; run; A character (ariable named )*+'*,- is contained in both the /*09.,-2T1 and /*09.,-2T7 SAS data sets. The (ariable )*+'*,- has a length of 5 in the /*09.,-2T1 data set and a length of : in the /*09.,-2T7 data set. /hich one of the following is the length of the (ariable )*+'*,- in the output data set4

A. 5 +. : '. 5 ,. 17 Ans: a 5&. The following SAS ,ATA step is submitted: data wor!.accounting; set wor!.department; length #obcode ; 17; run; The /*09.,-2A0T<-3T SAS data set contains a character (ariable named )*+'*,- with a length of 5. /hich one of the following is the length of the (ariable )*+'*,- in the output data set4 A. 5 +. 5 '. 17 ,. The length can not be determined as the program fails to e=ecute due to errors. Ans: a 56. /hich one of the following SAS statements renames two (ariables4 A. set wor!.dept1 wor!.dept7 rename " #code " #obcode% sal " salary%%; +. set wor!.dept1 wor!.dept7 rename " #code " #obcode sal " salary%%; '. set wor!.dept1 wor!.dept7 rename " #code " #obcode sal " salary%; ,. set wor!.dept1 wor!.dept7 rename " #code #obcode% sal salary%%; Ans: b 55. The following SAS program is submitted: data wor!.company; set wor!.dept1 !eep " #obcode% wor!.dept7 rename " #code " #obcode%%; run;

/hich one of the following is the result4 A. The (ariable )'*,- is written to the output data set. +. The (ariable )*+'*,- is written to the output data set. '. 3either (ariable )'*,- nor )*+'*,- is written to the output data set. ,. The program fails to e=ecute due to errors. Ans: b 5.. The following SAS program is submitted: data wor!.passengers; if *rig2assengers " . then *rig2assengers " 188; Trans2assengers " 188; *rig2assengers " .; 3on2aying " 18; Total2assengers " sum *rig2assengers> Trans2assengers%; run; /hich one of the following is the (alue of the T*TA?2ASS-3@-0S (ariable in the output data set4 A. 188 +. 118 '. 788 ,. . missing numeric (alue% Ans: a 5:. The following SAS program is submitted: data wor!.staff; )ob'ategory " 'AA'; )ob?e(el " '1'; )ob'ategory " )ob'ategory BB )ob?e(el; run; /hich one of the following is the (alue of the (ariable )*+'AT-@*0C in the output data set4 A. AA +. AA1 '. AA 1 ,. ' ' missing character (alue% Ans: a 55. The following SAS program is submitted: data wor!.one; = " &;

y " 7; D " = EE y; run; /hich one of the following is the (alue of the (ariable F in the output data set4 A. . +. G '. . missing numeric (alue% ,. The program fails to e=ecute due to errors. Ans: b 5G. The SAS data set named /*09.T-ST is listed below: capacity airplanetype staff 158 ?arge 18 /hich one of the following SAS programs created this data set4 A. data wor!.test; capacity " 158; if 188 le capacity le 788 then airplanetype " '?arge' and staff " 18; else airplanetype " 'Small' and staff " 5; run; +. data wor!.test; capacity " 158; if 188 le capacity le 788 then do; airplanetype " '?arge'; staff " 18; end; else do; airplanetype " 'Small'; staff " 5; end; run; '. data wor!.test; capacity " 158; if 188 le capacity le 788 then do; airplanetype " '?arge'; staff " 18; else do; airplanetype " 'Small';

staff " 5; end; run; ,. data wor!.test; capacity " 158; if 188 le capacity le 788 then; airplanetype " 'Small'; staff " 5; else; airplanetype " '?arge'; staff " 18; run; Ans: b .8. The following SAS program is submitted: data wor!.flights; destination " 'cph'; select destination%; when '?H0'% city " '?ondon'; when ''2H'% city " ''openhagen'; otherwise city " '*ther'; end; run; /hich one of the following is the (alue of the '1TC (ariable4 A. *ther +. 'openh '. 'openhagen ,. ' ' missing character (alue% Ans: a .1. The following SAS program is submitted: data wor!.flights; destination " ''2H'; select destination%; when '?H0'% city " '?ondon'; when ''2H'% city " ''openhagen'; otherwise; end; run; /hich one of the following is the (alue of the '1TC (ariable4 A. ?ondon

+. 'openh '. 'openhagen ,. ' ' missing character (alue% Ans: b


92. The following SAS program is submitted: data worA.new; length word 4@; amount ! 6; if amount ! 6 then word ! 7?%&*7; else if amount ! @ then word ! 7S)K)'7; else word ! 7'%')TTT7; amount ! @; run; #hich one of the following represents the values of the A$%&'T and #%*/ variables, A. amount word @ ?%&* -. amount word @ S)K)' .. amount word 6 ?%&* /. amount word 6 7 7 0missing character value1 Ans: a 93. The SAS data set )$(=%+))_:'?% is listed below: :/'umber );penses 2>62 1 . 3912 133.1> 21HF 236.36 21HF 111.12 The following SAS program is submitted: proc sort data ! employee_info; run; #hich one of the following -+ statements completes the program and sorts the data seMuentially by descending e;pense values within each descending :/'&$-)* value, A. by descending :/'umber );penses; -. by 0:/'umber );penses1 descending; .. by :/'umber descending );penses descending; /. by descending :/'umber descending );penses; Ans: d

96. The SAS data set RT*1_*)K)'&) is listed below: destination revenue ++O >3936 ?*A 9212H ?*A @>H92 */& @92>6 ++O F21@6 The following SAS program is submitted: proc sort data ! Mtr1_revenue; by destination descending revenue; run; #hich one of the following represents the first observation in the output data set, A. destination revenue ++O F21@6 -. destination revenue ++O >3936 .. destination revenue ?*A 9212H /. destination revenue ?*A @>H92 Ans: d 9>. The following SAS program is submitted: libname company 7SAS2data2library7; proc sort data ! company.payroll; by )mployee:/'umber; run; #rite access has been granted to the .%$(A'+ library. #hich one of the following represents how the observations are sorted, A. .%$(A'+.(A+*%== is recreated in sorted order by )mployee:/'umber. -. .%$(A'+.(A+*%== is stored in original order5 and a new data set (A+*%== is created in sorted order by )mployee:/'umber. .. .%$(A'+.(A+*%== is stored in original order5 and a new data set .%$(A'+.(A+*%==S%*T)/ is created in sorted order by )mployee:/'umber. /. .%$(A'+.(A+*%== is recreated in sorted order by )mployee:/'umber5 and a new data set (A+*%== is created in sorted order by )mployee:/'umber. Ans: a 99. The SAS data set )$(=%+))_:'?% is listed below: :/'umber );penses 2>62 1 .

3912 133.1> 21HF 236.36 21HF 111.12 The following SAS program is submitted: proc sort data ! employee_info; run; #hich one of the following -+ statements completes the program and sorts the data seMuentially by ascending e;pense values within each ascending :/'&$-)* value, A. by );penses :/'umber; -. by :/'umber );penses; .. by ascending 0:/'umber );penses1; /. by ascending :/'umber ascending );penses; Ans: d 9@. The SAS data set #%*D.A#A*/S is listed below: fname points Amy 2 Amy 1 Lerard 3 #ang 3 #ang 1 #ang 2 The following SAS program is submitted: proc sort data ! worA.awards; by descending fname points; run; #hich one of the following represents how the observations are sorted, A. #ang 3 Lerard 3 #ang 2 Amy 2 #ang 1 Amy 1 -. #ang 3 #ang 2 #ang 1 Lerard 3 Amy 2 Amy 1 .. #ang 3 #ang 1 #ang 2

Lerard 3 Amy 2 Amy 1 /. #ang 1 #ang 2 #ang 3 Lerard 3 Amy 1 Amy 2 Ans: b 9F. The observations in the SAS data set #%*D.T)ST are ordered by the values of the variable 'A$). The following SAS program is submitted: proc sort data ! worA.test out ! worA.testsorted; by name; run; #hich one of the following is the result of the SAS program, A. The data set #%*D.T)ST is stored in ascending order by values of the 'A$) variable. -. The data set #%*D.T)ST is stored in descending order by values of the 'A$) variable. .. The data set #%*D.T)STS%*T)/ is stored in ascending order by values of the 'A$) variable. /. The data set #%*D.T)STS%*T)/ is stored in descending order by values of the 'A$) variable. Ans: c 9H. #hich one of the following statements is true regarding the name of a SAS array, A. :t is saved with the data set. -. :t can be used in procedures. .. :t e;ists only for the duration of the /ATA step. /. :t can be the same as the name of a variable in the data set. Ans: c @ . The following SAS program is submitted: data stats; set revenue; array weeAlyB>C mon tue wed thu fri; total ! weeAlyBiC J .2>; output; end;

run; #hich one of the following /% statements completes the program and processes the elements of the #))D=+ array, A. do i ! 1 to >; -. do weeAlyBiC ! 1 to >; .. do i ! mon tue wed thu fri; /. A /% loop cannot be used because the variables referenced do not end in a digit. Ans: a @1. The following SAS program is submitted: data worA.test; array agentsB6C 4 12 sales1 2 sales6; run; #hich one of the following represents the variables that are contained in the output data set, A. SA=)S15 SA=)S25 SA=)S35 SA=)S6 -. AL)'TS15 AL)'TS25 AL)'TS35 AL)'TS6 .. 'one5 the /ATA step fails because the A**A+ statement can reference only numeric data. /. 'one5 the /ATA step fails because the A**A+ statement can reference only pre2 e;isting variables. Ans: a @2. The following SAS program is submitted: data worA.test; set worA.staff 0Aeep ! Iansales febsales marsales1; array diff_salesB3C difsales1 2 difsales3; array monthlyB3C Iansales febsales marsales; run; #hich one of the following represents the new variables that are created, A. <A'SA=)S5 ?)-SA=)S and $A*SA=)S -. $%'TE=+15 $%'TE=+2 and $%'TE=+3 .. /:?SA=)S15 /:?SA=)S2 and /:?SA=)S3 /. /:??_SA=)S15 /:??_SA=)S2 and /:??_SA=)S3 Ans: c @3. %n which portion0s1 of a SAS data set does the (*:'T procedure report, A. the data portion only -. the descriptor portion only .. the descriptor portion and the data portion /. neither the data portion nor the descriptor portion Ans: a

@6. #hich one of the following SAS procedures displays the data portion of a SAS data set, A. (*:'T -. ?S=:ST .. .%'T)'TS /. /ATAS)TS Ans: a @>. The following SAS program is submitted: proc datasets lib ! sasuser; contents data ! class varnum; Muit; #hich one of the following is the purpose of the KA*'&$ option, A. to print a list of variable names -. to print the total number of variables .. to print a list of the variables in alphabetic order /. to print a list of the variables in the order they were created Ans: d @9. The following SAS program is submitted: proc contents data ! sasuser.airplanes; run; #hich one of the following is produced as output, A. the data portion of every data set in the SAS&S)* library -. the data portion of the data set SAS&S)*.A:*(=A')S only .. the descriptor portion of every data set in the SAS&S)* library /. the descriptor portion of the data set SAS&S)*.A:*(=A')S only Ans: d @@. A raw data file is listed below: 222222221 22222222 22222223 <ohn $c.losAey 3> @1 <une *osesette 1 63 TineAe <ones H 3@ The following SAS program is submitted using the raw data file as input: data worA.homeworA; infile 7file2specification7; input name 4 age height; if age =) 1 ; run; Eow many observations will the #%*D.E%$)#%*D data set contain, A. -. 2

.. 3 /. 'o data set is created as the program fails to e;ecute due to errors. Ans: c @F. The SAS/ATA.-A'DS data set has five observations when the following SAS program is submitted: libname sasdata 7SAS2data2library7; data allobs; set sasdata.banAs; capital! ; do year ! 2 to 2 2 by >; capital G 00capitalG2 1 J rate1; output; end; run; Eow many observations will the A==%-S data set contain, A. > -. 1> .. 2 /. 2> Ans: d @H. The SAS data set named .%$(A'+.(*:.)S is listed below: .%$(A'+.(*:.)S prodid price producttype sales returns D12S >.1 ')T#%*D 1> 2 -132S 2.36 EA*/#A*) 3 1 *1FD+2 1.2H S%?T#A*) 2> > 3D=F-+ 9.3@ EA*/#A*) 12> 1> /+9>/# >.9 EA*/#A*) 6> > /LT+23 6.>> EA*/#A*) 9@ 2 The following SAS program is submitted: libname company 7SAS2data2library7; data hware inter soft; set company.prices 0Aeep ! producttype price1; if price le >. ; if producttype ! 7EA*/#A*)7 then output E#A*); else if producttype ! 7')T#%*D7 then output :'T)*; else if producttype ! 7S%?T#A*)7 then output S%?T; run; Eow many observations does the E#A*) data set contain, A. -. 2

.. 6 /. 9 Ans: b F . The following SAS program is submitted: data allobs; set sasdata.origin 0firstobs ! @> obs ! 6HH1; run; The SAS data set SAS/ATA.%*:L:' contains 1 observations. Eow many observations does the A==%-S data set contain, A. 626 -. 62> .. 6HH /. 1 Ans: b F1. The following SAS program is submitted: data _null_; set old 0Aeep ! prod sales1 sales21; file 7file2specification7; put sales1 sales2; run; #hich one of the following default delimiters separates the fields in the raw data file created, A. : 0colon1 -. 0space1 .. 5 0comma1 /. ; 0semicolon1 Ans: b F2. The following SAS program is submitted: data _null_; set old; put sales1 sales2; run; #here is the output written, A. the SAS log -. the raw data file that was opened last .. the SAS output window or an output file /. the data set mentioned in the /ATA statement Ans: a

F3. The contents of the raw data file T)A$ are listed below: 222222221 22222222 22222223 <anice 1 Eenri 11 $ichael 11 Susan 12 The following SAS program is submitted: data group; infile 7team7; input name 41>. age 2.; file 7file2specification7; put name 41>. G> age 2.; run; #hich one of the following describes the output created, A. a raw data file only -. a SAS data set named L*%&( only .. a SAS data set named L*%&( and a raw data file /. 'o output is generated as the program fails to e;ecute due to errors. Ans: c F6. The contents of the SAS data set named ()*$.ST&/)'TS are listed below: name age Alfred 16 Alice 13 -arbara 13 .arol 16 The following SAS program is submitted using the ()*$.ST&/)'TS data set as input: libname perm 7SAS2data2library7; data students; set perm.students; file 7file2specification7; put name 41>. 8> age 2.; run; #hich one of the following represents the values written to the output raw data file, A. 222222221 22222222 22222223 Alfred 16 Alice 13 -arbara 13 .arol 16 -. 222222221 22222222 22222223 Alfr16 Alic13 -arb13a .aro16

.. 222222221 22222222 22222223 Alfr16ed Alic13e -arb13ara .aro16l /. 222222221 22222222 22222223 Alfred 16 Alice 13 -arbara 13 .arol 16 Ans: b F>. The contents of the SAS data set ()*$.<A'_SA=)S are listed below: KA*:A-=) 'A$) T+() idnum character variable sales_date numeric date value A comma delimited raw data file needs to be created from the ()*$.<A'_SA=)S data set. The SA=)S_/AT) values need to be in a $$//++1 form. #hich one of the following SAS /ATA steps correctly creates this raw data file, A. libname perm 7SAS2data2library7; data _null_; set perm.Ian_sales; file 7file2specification7 dsd ! 757; put idnum sales_date : mmddyy1 .; run; -. libname perm 7SAS2data2library7; data _null_; set perm.Ian_sales; file 7file2specification7 dlm ! 757; put idnum sales_date : mmddyy1 .; run; .. libname perm 7SAS2data2library7; data _null_; set perm.Ian_sales; file 7file2specification7; put idnum sales_date : mmddyy1 . dlm ! 757; run; /. libname perm 7SAS2data2library7; data _null_; set perm.Ian_sales; file 7file2specification7; put idnum sales_date : mmddyy1 . dsd ! 757; run;

Ans: b F9. A raw data record is shown below: @<an2 2 #hich one of the following informats would read this value and store it as a SAS date value, A. dateH. -. ddmonyyH. .. dd$$$yyH. /. ddmmmyyyyH. Ans: a F@. The following SAS program is submitted: libname temp 7SAS2data2library7; data worA.new; set temp.Iobs; format newdate mmddyy1 .; Mdate ! Mtr0newdate1; ddate ! weeAday0newdate1; run; proc print data ! worA.new; run; The variable ')#/AT) contains the SAS date value for April 1>5 2 #hat output is produced if April 1>5 2 falls on a Saturday, A. %bs newdate Mdate ddate 1 A(*1>2 29 -. %bs newdate Mdate ddate 1 6"1>"2 29 .. %bs newdate Mdate ddate 1 A(*1>2 2@ /. %bs newdate Mdate ddate 1 6"1>"2 2@ Ans: d FF. The following SAS program is submitted: data worA.report; set worA.sales_info; if Mtr0sales_date1 ge 3; run; The SAS data set #%*D.SA=)S_:'?% has one observation for each month in the year 2 and the variable SA=)S_/AT) which contains a SAS date value for each of the twelve months. Eow many of the original twelve observations in #%*D.SA=)S_:'?% are written to the #%*D.*)(%*T data set,

A. 2 -. 3 .. 9 /. H Ans: c FH. The following SAS program is submitted: data revenue; set year_1; var1 ! mdy0151>51H9 1; run; #hich one of the following values does the variable named KA*1 contain, A. 16 -. 1> .. 11>1H9 /. 71"1>"1H9 7 Ans: a H . The following SAS program is submitted: data worA.new; mon ! 3; day ! 23; year ! 2 ; date ! mdy0mon5day5year1; run; #hich one of the following is the value of the /AT) variable, A. a character string with the value 723mar2 7 -. a character string with the value 7 3"23"2 7 .. a numeric value of 169H25 which represents the SAS date value for $arch 235 2 /. a numeric value of 3232 5 which represents the SAS date value for $arch 235 2 Ans: c H1. The following SAS /ATA step e;ecutes on $onday5 April 2>5 2 : data newstaff; set staff; start_date ! today01; run; #hich one of the following is the value of the variable STA*T_/AT) in the output data set, A. a character string with the value 7 6"2>"2 7 -. a character string with the value 7$onday5 April 2>5 2 7 .. the numeric value 16@2>5 representing the SAS date for April 2>5 2 /. the numeric value 62>2 5 representing the SAS date for April 2>5 2

Ans: c H2. The following SAS /ATA step is submitted: data sasdata.atlanta sasdata.boston worA.portland worA.phoeni;; set company.prdsales; if region ! 7')7 then output boston; if region ! 7S)7 then output atlanta; if region ! 7S#7 then output phoeni;; if region ! 7'#7 then output portland; run; #hich one of the following is true regarding the output data sets, A. 'o library references are reMuired. -. The data sets listed on all the :? statements reMuire a library reference. .. The data sets listed in the last two :? statements reMuire a library reference. /. The data sets listed in the first two :? statements reMuire a library reference. Ans: d H3. #hich one of the following SAS /ATA steps saves the temporary data set named $+/ATA as a permanent data set, A. libname sasdata 7SAS2data2library7; data sasdata.mydata; copy mydata; run; -. libname sasdata 7SAS2data2library7; data sasdata.mydata; Aeep mydata; run; .. libname sasdata 7SAS2data2library7; data sasdata.mydata; save mydata; run; /. libname sasdata 7SAS2data2library7; data sasdata.mydata; set mydata; run; Ans: d H6. The following SAS /ATA step is submitted: libname temp 7SAS2data2library7; data temp.report; set sasuser.houses;

newvar ! price J 1. 6; run; #hich one of the following statements is true regarding the program above, A. The program is reading from a temporary data set and writing to a temporary data set. -. The program is reading from a temporary data set and writing to a permanent data set. .. The program is reading from a permanent data set and writing to a temporary data set. /. The program is reading from a permanent data set and writing to a permanent data set. Ans: d H>. The following SAS S%*T procedure step generates an output data set: proc sort data ! sasuser.houses out ! report; by style; run; :n which library is the output data set stored, A.#%*D -.*)(%*T. ..E%&S)S /.SAS&S)* Ans: a H9. The following SAS program is submitted: proc sort data!worA.employee; by descending fname; proc sort data!worA.salary; by descending fname; data worA.empdata; merge worA.employee worA.salary; by fname; run; #hich one of the following statements e;plains why the program failed e;ecution, A. The S%*T procedures contain invalid synta;. -. The merged data sets are not permanent SAS data sets. .. The data sets were not merged in the order by which they were sorted. /. The *&' statements were omitted after each of the S%*T procedures. Ans: c H@. The SAS data sets #%*D.)$(=%+)) and #%*D.SA=A*+ are shown below: #%*D.)$(=%+)) #%*D.SA=A*+ fname age name salary

-ruce 3 -ruce 2> /an 6 -ruce 3> /an 2> The following SAS program is submitted: data worA.empdata; by fname; totsal G salary; run; #hich one of the following statements completes the merge of the two data sets by the ?'A$) variable, A. merge worA.employee worA.salary 0fname ! name1; -. merge worA.employee worA.salary 0name ! fname1; .. merge worA.employee worA.salary 0rename ! 0fname ! name11; /. merge worA.employee worA.salary 0rename ! 0name ! fname11; Ans: d HF. The SAS data sets #%*D.)$(=%+)) and #%*D.SA=A*+ are listed below: #%*D.)$(=%+)) #%*D.SA=A*+ fname age fname salary -ruce 3 -ruce 2> /an 6 -ruce 3> /an 2> The following SAS program is submitted: data worA.empdata; merge worA.employee worA.salary; by fname; totsal G salary; run; Eow many variables are output to the #%*D.)$(/ATA data set, A. 3 -. 6 .. > /. 'o variables are output to the data set as the program fails to e;ecute due to errors. Ans: b HH. The contents of two SAS data sets named )$(=%+)) and SA=A*+ are listed below: )$(=%+)) SA=A*+ name age name salary

-ruce 3 -ruce 6 /an 3> -ruce 3> /an 3@ /an . The following SAS program is submitted: data worA.empsalary; merge worA.employee 0in ! inemp1 worA.salary 0in ! insal1; by name; if inemp and insal; run; Eow many observations will the data set #%*D.)$(SA=A*+ contain, A. 2 -. 6 .. > /. 9 Ans: b 1 . The following SAS program is submitted: data worA.empsalary; set worA.people 0in ! inemp1 worA.money 0in ! insal1; if insal and inemp; run; The SAS data set #%*D.()%(=) has > observations5 and the data set #%*D.$%')+ has @ observations. Eow many observations will the data set #%*D.)$(SA=A*+ contain, A. -. > .. @ /. 12 Ans: a 1 1. The following SAS program is submitted: data numrecords; infile 7file2specification7; input 81 patient 41>. relative 4 19229 8; :f relative ! 7children7 then input 8>6 diagnosis 41>. 8; else if relative ! 7parents7 then input 82F doctor 41>. clinic 4 662>3 8>6 diagnosis 41>. 8;

input age; run; Eow many raw data records are read during each iteration of the /ATA step during e;ecution, A. 1 -. 2 .. 3 /. 6 Ans: a 1 2. A raw data file is listed below: *A'.E512> 52515Sheppard Avenue5Q4965 Q S(=:T511H 51515*and Street5Q49>5F> Q .%'/%516 5251.>5$arAet Street5QF 5 > Q T#%ST%*+51F1 56535Larris Street5Q41 @52> Q *A'.E51> 53535Demble Avenue5Q4F959> Q S(=:T5191>56535#est /rive5QH656> Q S(=:T513 >5351.>5Lraham Avenue5Q4@359> Q The following SAS program is submitted using the raw data file as input: data worA.condo_ranch; infile 7file2specification7 dsd; input style 4 8; if style ! 7.%'/%7 or style ! 7*A'.E7; input sMfeet bedrooms baths street 4 price : dollar1 .; run; Eow many observations will the output data set contain, A. -. 3 .. > /. @ Ans: b 1 3. A raw data file is listed below: *A'.E512> 52515Sheppard Avenue5Q4965 Q S(=:T511H 51515*and Street5Q49>5F> Q .%'/%516 5251.>5$arAet Street5QF 5 > Q T#%ST%*+51F1 56535Larris Street5Q41 @52> Q *A'.E51> 53535Demble Avenue5Q4F959> Q S(=:T5191>56535#est /rive5QH656> Q S(=:T513 >5351.>5Lraham Avenue5Q4@359> Q The following SAS program is submitted using the raw data file as input: data worA.condo_ranch; infile 7file2specification7 dsd; input style 4 8;

if style ! 7.%'/%7 or style ! 7*A'.E7 then input sMfeet bedrooms baths street 4 price : dollar1 .; run; Eow many observations does the #%*D..%'/%_*A'.E data set contain, A. -. 3 .. > /. @ Ans: d 1 6. The contents of the raw data file ?&*':T&*) are listed below: 222222221 22222222 22222223 chair55table chair5couch5table The following SAS program is submitted: data stocA; infile 7furniture7 dsd; input item1 4 item2 4 item3 4; run; #hich one of the following is the value of the variable named :T)$2 in the first observation of the output data set, A. table -. 5table .. . 0missing numeric value1 /. 7 7 0missing character value1 Ans: d 1 >. The following SAS program is submitted: libname rawdata1 7location of SAS data library7; filename rawdata2 7location of raw data file7; data worA.testdata; infile input sales1 sales2; run; #hich one of the following is needed to complete the program correctly, A. rawdata1 -. rawdata2 .. 7rawdata17 /. 7rawdata27 Ans: b

1 9. A raw data record is listed below: 222222221 22222222 22222223 son5Travis5 The following output is desired: relation firstname son Travis #hich one of the following SAS programs reads the data correctly, A. data family " dlm ! 757; infile 7file2specification7; input relation 4 firstname 4; run; -. options dlm ! 757; data family; infile 7file2specification7; input relation 4 firstname 4; run; .. data family; infile 7file2specification7 dlm ! 757; input relation 4 firstname 4; run; /. data family; infile 7file2specification7; input relation 4 firstname 4 " dlm ! 757; run; Ans: c 1 @. The contents of the raw data file T+().%=%* are listed below: 222222221 22222222 22222223 daisyyellow The following SAS program is submitted: data flowers; infile 7typecolor7; input type 4 12> G1 color 4; run; #hich one of the following represents the values of the variables T+() and .%=%*, A. type color daisy yellow -. type color daisy ellow .. type color daisyyellow 0missing character value1 /. 'o values are stored as the program fails to e;ecute due to synta; errors. Ans: b

1 F. The contents of the raw data file (*%/&.T are listed below: 222222221 22222222 22222223 26913 42>.31 The following SAS program is submitted: data inventory; infile 7product7; input idnum >. 81 price; run; #hich one of the following is the value of the (*:.) variable, A. 2>.31 -. 42>.31 .. . 0missing numeric value1 /. 'o value is stored as the program fails to e;ecute due to errors. Ans: c 1 H. The following SAS program is submitted: proc print data ! sasuser.houses; run; proc means data ! sasuser.shoes; run; #hich one of the following %(T:%'S statements resets the page number to 1 for the second report, A. options pageno ! 1; -. options pagenum ! 1; .. options reset pageno ! 1; /. options reset pagenum ! 1; Ans: a 11 . The following SAS program is submitted: data worA.sets; do until 0prod gt 91; prod G 1; end; run; #hich one of the following is the value of the variable (*%/ in the output data set, A. > -. 9 .. @ /. F Ans: c

111. #hich one of the following is true of the S&$ statement in a SAS /ATA step program, A. :t is only valid in conIunction with a S&$ function. -. :t is not valid with the S)T5 $)*L) and &(/AT) statements. .. :t adds the value of an e;pression to an accumulator variable and ignores missing values. /. :t does not retain the accumulator variable value from one iteration of the SAS /ATA step to the ne;t. Ans: c 112. The following SAS program is submitted: data worA.new; length word 4@; amount ! @; if amount ! > then word ! 7.AT7; else if amount ! @ then word ! 7/%L7; else word ! 7'%')TTT7; amount ! >; run; #hich one of the following represents the values of the A$%&'T and #%*/ variables, A. amount word > /%L -. amount word > .AT .. amount word @ /%L /. amount word @ 7 7 0missing character value1 Ans: a 113. #hen the following SAS program is submitted5 the data set SAS/ATA.(*/SA=)S contains > observations: libname sasdata 7SAS2data2library7; options obs ! > ; proc print data ! sasdata.prdsales 0firstobs ! 1 1; run; options obs ! ma;; proc means data ! sasdata.prdsales 0firstobs ! > 1; run; Eow many observations are processed by each procedure, A. 6 for (*%. (*:'T 6> for (*%. $)A'S -. 6 1 for (*%. (*:'T 6> 1 for (*%. $)A'S .. 6 1 for (*%. (*:'T 6> for (*%. $)A'S

/. > for (*%. (*:'T > for (*%. $)A'S Ans: b 116. :n the following SAS program5 the input data files are sorted by the 'A$)S variable: libname temp 7SAS2data2library7; data temp.sales; merge temp.sales worA.receipt; by names; run; #hich one of the following results occurs when this program is submitted, A. The program e;ecutes successfully and a temporary SAS data set is created. -. The program e;ecutes successfully and a permanent SAS data set is created. .. The program fails e;ecution because the same SAS data set is referenced for both read and write operations. /. The program fails e;ecution because the SAS data sets on the $)*L) statement are in two different libraries. Ans: b 11>. data samp ;
a=RAMA; b=1758; c=a||b; run; What will be the value in c? a RAMA1758 b RAMA 1758 c RAMA 1758 d err!r because we cant c!ncatenate character and numeric" Ans# a 11$" data emp; ename=RAMA%A&'( s=substr)scan)ename*1 *1*1 ; run; What is the len+th !, a variable s in the ab!ve step?

a. - b 1 c 8 d .//" Ans: d

117. data x; input a $ b; cards; $ 250 $100 ; What will be the value of b in the above step? a)$100 b)100 c) . d) character ans# c 120. data0null0;
set emp; 1ut 21en!3" 25ename41/" 2./ sal 7"; run; Which stmt bel!w is true re+ardin+ ab!ve step?

issin!";

a. it writes the c!ntents !, emp t! sas l!+" b. &t writes the c!ntents t! recentl5 assi+ned ,ilere," c. 65nta7 err!r bc!8 ,ile stmt is n!t present" d. %!ne !, the ab!ve" Ans:A

121. data emp;


d! until)795 ; 7:1; end; run;

What will be the value !, 7 in the dataset? a 5 b $ c 7 d 1"

$ns# b 122. data emp;


7=$ d! while)7;$ ; 7:1; end; run; a 7=" b 7=1 c 7=$ d 7=5 "

ans# c
123. pr!c s!rt data=ram"emp;
b5 en!; run; Which stmt is true re+ardin+ ab!ve step? a it st!res the s!rted data in a temp!rar5 dataset emp b it replaces the same dataset with s!rted data c it creates the emps!rt dataset with s!rted data in ramalibrar5 d n!ne !, the ab!ve

126. which steps s!rts the data c!rrectl5? a. pr!c s!rt data=emp;
b5 descendin+ )dept sal ; run;

b. pr!c s!rt data=emp;

b5 descendin+ dept descendin+ sal; run;

c. pr!c s!rt data=emp;


b5 descendin+ )dept sal ; run;

d. pr!c s!rt data=emp;


b5 descendin+ )dept *sal ; run;

125. data e p; %nput date &'.(; )ards; 1**7+07+15 ; Which infor at is user to read the above data.

$ns# ,,

dd10.

12-. data sa p; .et e p/0eep 1a b c d e); %f a1100 then d150; 2eep a b; 3un; 4ow an, variable will be written to dataset sa p;

5nl, a6 b 127. data e p;

.et e pd/in1a) e p/in1b); %f a and b; 3un; $ssu e that a contains 5 and b contains - obs. 4ow dataset e p; $ns# 127. data 8null8; $1 d,/10959*-); :ut a; 3un; What is the value of a? $ns#1;<27 12*. =ata 8null8; %nput a; )ards; $29;<5 ; What is the value of 8error8 in the step? $ns#1 1;0. Which step below is correct? a) data e p; %nfile cards dl 1>9>; %nput eno ena e $; )ards; an, records will be written to the o+p

111 suresh ; b) =ata e p dl 1>9>; %nfile cards; %nput eno ena e $; )ards; 111 suresh ; $ns# a 1;1. Which for at will displa, the nu ber *-77 in *9-77 for at? $ns# co a5.

1;2. =ata ? p; %nfile @c#Ae p.txt>; %nput Bstatus $;. B; %f status1>raC> then Dhen B< sales co a<. B;

?lse input B< sales dollar5.B; %nput predict; 3un; 4ow an, records will be read b, the above step in one iteration?

1;;. proc freE data1e p; a. Dables deptno9sal; b. tables deptno sal

c. tables deptno; d. Dables sal; 3un; 1;<. Which one below produce tabular o+p. :roc freE data1?F:; a. Dables detnoGsal b. b. tables deptno9sal c. c. tables deptno.sal;

3un; 1;5. data percent/drop1i Etr1HEtr<); .et donate; Dotal1su /of Etr1HEtr2); $rra, conribI<J Etr1HEtr<; $rra, percent/<); =o i11 to <; :ercent /i)1contrib./i)+total; ?nd; 3un; What variables will be created in the o+p dataset? $ns# total9 percent19percent29percent;9percent<. 1;-. =ata ?F:; .et e p1; Dotal8sal; $ssu e that e p1 has ; variables

4ow

an, variables will be there in the e p after co pilation?

1;7. Which st t !enerate the value 7 in the variable a? a) a12G; b) a12GG; c) a1;GG2 d)none 1;7. What is the len!th of the variable a? =ata e p; $1>17*7>; 3un; $ns# < 1;*. =ata e p1; .et ?F:; Where eno1111; Where eno1112; Which where st t will be affected to o+p dataset? Kast where state ent 112 1<0. =ata e p; %nput eno; )ards; H12; ; What will be the value of eno is the e p;

$ns# H12;
161. #hich portion of the dataset will display when we run a (*%. (*:'T procedure, Ans: data portion

1<2. =ata ?F:; .et ?F:; L, deptno; %f first .deptno then DotalMsal; %f last.deptno; 3un; $ns# totalsal contains sal for each deptno; /in this he has !iven one %n one dept 50 e pl,ees there and out of 50 dept nos how 1<;. =ata ?F:; %nfile @c#Asal.txt> end1eof; &include st t( 3un; Which st t causes sas to write onl, the last record into dataset? $ns# eof11 1<<. =ata x; Ken!th ena e $20; %nfile cards dsd; )ards; 1119"suresh90u ar"9<00 1;29"anC90u ar"9;00 ore Euestion as no.s li0e

an, records will be updated?)

; Which step re!ardin! above step is true?


a. it reads correctly b1it reMuires dlm c1it wonUt read correctly d1synta; error

1<5. =ata su .et te ps;

er;

%f te (100 then status1>hot>; ?lse status1>cold>; 3un; De p 100 50 What is the value of status for the second record? $ns# cold 1<-. =ata a; %nput a b; )1a+b; )ards; 10 . 0 ;0 . 12 1< . Nalues of ) in the dataset. $ns# .909.9. 1<7. %f there is an error in 8n8 then what will be the value of the 8error8 and

What is the value of it in the next st t of 8n8; 1<7. =ata !en; =o i11 to -; O1xGG2; ?nd; 3un; What is the o+p; $ns# i179 ,1. 9x1. 1<*. =ata e p; Nar1>fa>; Nar11>1>; Nar1varPPvar1; 3un; What is the value of var in o+p dataset? $ns# fa 150. Which step below is ri!ht? 1) set e p /rena e1/eno1e pno)/ena e1e pna e)); 2) set e p/rena e1/eno1e pno ena e1e pna e)); ;) set e p/rena e1/eno1e pno9ena e1e pna e));
1>1. #hich SAS function below returns an argument with leading blanAs moved to the end of the value, 1. *:LET 2. T*:$ 3. =)'LTE 6. <&ST:?+

>. =)?T 1>2. #hat is one of the uses of a Q8Q when reading a file in a /ATA step, 1. To trim the space to the right of a character variable in the :'(&T statement 2. To create a SAS constant 3. To hold a record in the input buffer for further processing 6. To test the relationship between two values >. To separate elements of a character string 1>3. #hen a /ATA step is submitted5 in what order are data set options and /ATA step statements processed, 1. %ptions on :'(&T data sets5 then options on %&T(&T data sets5 then STAT)$)'TS 2. %ptions on STAT)$)'TS5 then options on %&T(&T data sets5 then options on :'(&T data sets 3. %ptions on STAT)$)'TS5 then options on :'(&T data sets5 then options on %&T(&T data sets 6. %ptions on %&T(&T data sets5 then STAT)$)'TS5 then options on :'(&T data sets >. %ptions on :'(&T data sets5 then STAT)$)'TS5 then options on %&T(&T data sets 1>6. #hich (*%. below is used to acMuire descriptor information about a data set, 1. (*%. STAT:ST:.S 2. (*%. $)A'S 3. (*%. .%'T)'TS 6. (*%. /)S.*:(T:%' >. (*%. .ATA=%L 1>>. #hat is the effect of the SAS statement %(T:%'S $:SS:'L!, 1. :t specifies the character to be printed for missing numeric variables. 2. :t indicates whether or not the /ATA step is to account for missing values in a (*%. statement 0 for no and 1 for yes1. 3. :t aborts a program if missing values are encountered during /ATA step processing. 6. :t controls the ma;imum number of missing values which will be written to a data set.

>. :t controls whether or not missing variables are written to the data set. 1>9. /ata Set ?ruit /ata Set Keggie

%-S KA*1 1 2 3 6 a b c c

?ruit 1 2 3

%-S KA*1 a b c bean pea corn

Keggie

banana melon grape grape

:f data set ?*&:T and data set K)LL:) are concatenated to create data set -%TE5 how many observations would data set -%TE contain, 1. Two 2. Three 3. ?our 6. ?ive >. Seven 1>@. #hich %(T:%' Aeyword on a (*%. S&$$A*+ specifies to output only the observations with the highest _T+()_ value to a data set, 1. $:SS:'L 2. $AP/). 3. :/$:' 6. %*/)*!data >. '#A+ 1>F. :? .:T+!:7A7; #hat does the SAS statement above do, 1. :f there is an A anywhere in the city variable5 it selects that observation. 2. :t selects all cities that contain an a in the value. 3. :f a S.A' of the variable city indicates a character value5 it selects that observation.

6. :t selects those observations with cities beginning with an A. >. :t formats the variable city with a trailing blanA. 1>H. A programmer wants to read rows 1 through 2 of an e;ternal file.

#hich of the following infile statements should she use, 1. infile ; obs!1 lastobs!2 ;

2. infile ; firstobs!1 1 lastobs!2 1; 3. infile ; obs!1 1 lastobs!2 ;

6. infile ; firstobs!1 1 obs!2 1; >. infile ; firstobs!1 obs!2 ;

19 . #hich %(T:%' statement below will center a printout, 1. <&ST:?+!?&== 2. '%.)'T)*%?? 3. .)'T)*%' 6. .)'T)* >. <&ST:?+!.)'T)* 191. data a; set ;; run;

options obs!>; data b; set ;; run;

data c; set ;;

output; output; run; Assuming data set P contains seven observations in the sample code above5 what are the number of observations that are written respectively to the data sets A5 -5 and ., 1. >5>5> 2. >5@5> 3. @5@5> 6. @5>5> 192. #hich numeric :'?%*$AT below converts blanAs to Neros, 1. -:TSw.d 2. -Ow.d 3. -=O*w.d 6. 4E)Pw. >. -:'A*+w.d 193. :n A**A+ processing5 what does the /:$ function do, 1. :t specifies the lower bound of an implicit array. 2. :t defines an implicit array. 3. :t suppresses the output of an implicit array in data set processing. 6. :t assigns a subscript to each of the array elements. >. :t returns the number of elements in a dimension of an array. 196. #hich date function below returns the number of time intervals in a given time span, 1. :'T'P 2. :'T.D 3. :'T** 6. $/+ >. A-S.

19>. data test; input 81 ; 4@. 81 y date@. 8F mm 2. 81 dd 2. 812 yy 2.; N ! mdy 0mm5 dd5 yy1; format y N mmddyy1 .; cards; 1S)( H 1

3A&LHH F 3HH >%.TFF1 >FF

26'%KHH1126HH ; proc sort data!test out!test1; by ;; proc sort data!test out!test2; by y; proc sort data!test out!test3; by N; proc print data!test1; proc print data!test2; proc print data!test3; run; Assume that is the yy value for 2 and the SAS system options are set to SAS Kersion9 default values. #hich data set in the sample code above 0T)ST1 or T)ST2 or T)ST31 will contain dates sorted in the e;pected ascending order, 1. T)ST1 %nly 2. T)ST2 %nly 3. T)ST3 %nly 6. -oth T)ST2 and T)ST3 >. 'one of the above 199. Vlet =:-!#%*D; Vlet /S'!T)ST;

(*%. print data!W=:-.W/S'; run; #hat needs to be done in order to print data set #%*D.T)ST, 1. +ou must put W=:- in V'*ST*01. 2. +ou must put W/S' in VST*01. 3. +ou must add a period. 6. +ou must add %(T:%'S /=$!7.7 before the (*%. step. >. 'othing 2 the sample code is correct. 19@. #hich function below returns a remainder when an integer Muotient of argument one divided by argument two is calculated, 1. A-S 2. $%/ 3. '$:SS 6. $:' >. *A'&': 19F. data test; infile cards; input X2 81 ; 46. "" 81 y 46.; cards; 1236 >9@F H 12 36>9 @FH ; proc print; run; #hat is the output of the sample code above,

.hoice 1 %-S 1 2 H 12 1236 P +

H 12 1236

.hoice 2 %-S 1 H 12 P +

36>9

.hoice 3 %-S 1 2 >9@F 1236 P +

36>9 >9@F

.hoice 6 %-S 1 2 3 >9@F 1236 1236 P +

36>9 >9@F H 12

.hoice > %-S 1 >9@F P +

36>9

19H. #hich of the following statements is true concerning (*%. SR=, 1. SR= can sort and summariNe5 but a (*%. (*:'T is necessary in order to get a printout of a Iob. 2. /irect access by (%:'T)*! control is available. 3. SR= can sort5 summariNe5 and print in one (*%.. 6. /ata needs to be sorted. >. #E)*) statements are not permitted in SR=. 1@ . #hich of the following statements comparing (&T and %&T(&T statements is valid,

1. %&T(&T writes observations to a SAS data set. (&T writes variable values or te;t to a SAS output file or to an e;ternal file. 2. %&T(&T statements must be included in a /ATA step if the data is to be written to a data set5 but a (&T statement is not needed to write to a flat file. 3. %&T(&T results are raw data written to an e;ternal file5 but (&T results are SAS data sets. 6. The %&T(&T statement is e;plicit in a /ATA step when writing to a SAS data set5 but the (&T statement is implicit in /ATA step processing. >. 'one of the above are true. 1@1. data _null_; ;!1"3; if ;!.3333 then put 7fraction7; #ill the (&T statement in the sample code above write out 7fraction75 and if not5 what code must be used, 1. +es. 2. 'o. if A-S0;5. 3. 'o. if *%&'/0;5. 11!.3333 then 11!.3333 then

6. 'o. if $%/0;531! then >. 'o. if (&T0;5. 11!.3333 then

1@2. #hich statement below assigns a value produced in a /ATA step to a macro variable, 1. VS+S=(&T 2. VS)T 3. VS+S.A== 6. .A== S+$(&T >. V)KA= 1@3. #hich statement selects observations to be processed in a (*%. step, 1. #E)*) 2. TE)' 3. :?

6. #E)' >. :?2TE)' 1@6. Vmacro test; Vdo I!1 Vto 1 ; data tempWI; Vif WI ! 1 Vthen Y,Z0retain var1 var2 var3;1; Velse Vif WI ! 2 Vthen Y,Z0retain var6 var> var9;1; ..more sas statements Vend; Vmend; Liven the sample code above5 what Aeyword is needed at the Y$A.*% ?&'.T:%'Z for this $A.*% to worA, 1. VST* 2. VRS.A' 3. VR&%T) 6. VS+$(&T >. V&'R&%T) 1@>. #hich of the following statements below is a valid comment format in SAS, 1. (*%. .%$$)'T: put comment here; 2. "J put comment here J" 3. " put comment here " 6. J" put comment here "J >. J put comment here J 1@9. #hich of the following is true about =:'D statements, 1. #hen more than one =:'D statement has been e;ecuted5 a *)T&*' statement tells the SAS system to go to the top of the /ATA step. 2. A =:'D statement is possible only in SR=.

3. The =:'D statement and the destination must be in the same /ATA step. 6. The actions of a =:'D statement and a L%T% statement are identical. >. A /ATA step may have an infinite number of =:'D statements. 1@@. (*%. S%*T data!T)ST '%/&(D)+; by KA*1; run; Liven the above sample code5 what happens to observations in data set T)ST, 1. :f KA*17s value was repeated in T)ST5 then all but one of the observations with that value were removed. 2. :f KA*17s value was repeated in T)ST5 then all the observations with that value were removed5 but only if the rest of the variables had identical values. 3. :f KA*17s value was repeated in T)ST5 then all the observations with that value were removed. 6. The value of first.KA*1 and last.KA*1 are both eMual to Nero. >. :f KA*17s value was repeated in T)ST5 then all the by variables are set to missing. 1@F. proc format; value ; 0fuNN!.31 1!7one7 2!7two7 3!7three7; #hat is the purpose of the ?&OO option in the sample code above, 1. :t specifies a width of the decimal value 2 in this case 3 decimal places. 2. :t indicates that if a variable falls within .3 of the value specified in the value statement5 the corresponding label is used to print the value. 3. :t prints the label defined in the value if the variable value contains a .3. 6. :t multiplies the value of the variable times .35 and if the result eMuals the label 0a certain number as defined in the /ATA step15 then prints the label. >. :t divides the value of the variable by .35 and if the result eMuals the label 0a certain number as defined in the /ATA step15 then prints the label.

1@H. #hich of the following creates a $A.*% variable and assigns it a value, 1. V$A.*% 2. V$)'/ 3. V(&T 6. V=)T >. VD)+/)? 1F . :n order to access a SAS data set in future SAS sessions5 what must be done, 1. The SAS data set must be created using a one2level SAS name. 2. The SAS data set must be created using a two2level SAS name. 3. (ermanent SAS data sets are not available in programming. 6. The SAS data set must be created with the libref of Q#%*DQ attached. >. All SAS data sets are available for future use once they are created in a /ATA step. 1F1. data ;; do obsnum ! 1 to 1 ; output; end; run; #hich /ATA step below will generate a subset of > %-S in data set P, .hoice 1 data ;; set ;; where _n_ lt 9; run; .hoice 2 data ;; set ; 0obs!>1;

run; .hoice 3 data ;; set ; obs!>; run; .hoice 6 data ;; set ; 0where!0obs!>11; run; .hoice > data ; 0where!0obs!>11; set ;; run; 1F2. /ata Set A /ata Set /ata Set .

0list of /emocrats1

%-S 'A$) S)P 1 )d $ 1 )d

%-S 'A$) AL) 6 1 )d 2 ?ranA 3 Tom

%-S 'A$)

2 ?ranA $ 3 Daren ? 6 Tom $

2 ?ranA 66 3 Daren 3 6 Tom >>

> #anda ?

> #anda 6H

Liven the three sorted data sets A5 -5 and . 0a list of /emocrats1 in the sample printout above5 which /ATA step below would produce a data set containing in each observation the name5 se;5 and age of only those who are '%T /emocrats, .hoice 1 data /;

set A - .; run; .hoice 2 data /; merge A 0in !a1 - 0in!b1 .; by name; if a and b and c; run; .hoice 3 data /; merge A - . 0in!c1: by name; if c! ; run; .hoice 6 data /; merge A - .; by name; run; .hoice > data /; merge A 0in!a1 - 0in!b1 .; if a ! 1 and b !1; by name; run; 1F3. :f var1 then salary!7added to income7;

Assuming that KA*1 is numeric5 which of the following statements is eMuivalent to the sample above, 1. The variable KA*1 is a character variable5 and if it has a non2blanA value5 then assign 7added to income7 to salary. 2. :f the variable KA*1 earned is present5 then go to label marAed salary!added to income. 3. :f the variable KA*1 is in the program data vector5 then assign 7added to income7 to salary. 6. Select all of the observations where salary is 7added to income7. >. :f the variable KA*1 is not eMual to 7.7 or 5 then salary ! 7added to income7. 1F6. data ;; infile y; input a b G> c; run; #hen reading in a raw file using an :'(&T statement5 what does 7G>7 do in the sample code above, 1. :t advances the pointer to column > of the ne;t input line. 2. :t moves the column pointer to column >. 3. :t moves the pointer > columns. 6. :t moves the pointer to the line >. >. :t inputs > lines into one observation. 1F>. :n a (*%. TA-&=AT)5 what table option supplies an integer value that specifies the number of print positions allotted to the heading in the row dimension, 1. -%P! 2. ?%*$.EA*! 3. *TS! 6. ((*! >. ?&OO! 1F9. :n a (*%. (*:'T5 is it possible to print only those variables that begin with a certain value5 such as all variables that begin with the letter A,

1. +es. To print out only those variables beginning with the letter A5 use A: in the KA* statement of the (*%. (*:'T. 2. 'o. :n order to specify what variables to print5 all the variables must be spelled out in their entirety. The only e;ception is for the :'(&T statement. 3. +es. To print out only those variables beginning with the letter A5 use WA in the KA* statement of the (*%. (*:'T. 6. 'o. 'owhere in SAS can you abbreviate a variable5 including the :'(&T statement. >. +es. To print out only those variables beginning with the letter A5 use AV in the KA* statement. 1F@. #hich of the following is true of the %(T:%'S statement in SAS programs, 1. The %(T:%'S statement can only be used at the beginning of a program. 2. The %(T:%'S statement can only be used in a /ATA step. 3. The %(T:%'S statement .A''%T be used within .A*/S data lines. 6. The %(T:%'S statement must be used within a (*%. step. >. %ne %(T:%'S statement .A''%T be overridden by another %(T:%'S statement. 1FF. data test; input 81 ; 41. 82 y 41. 83 N 41.; cards; A-. AAA-A ; proc sort data!test; by ; y N; data test; set test; by ; y N; f; ! first.;; fy ! first.y; fN ! first.N;

l; ! last.;; ly ! last.y; lN ! last.N; run; -ased on the above program5 what are the values of the following variables in data set T)ST, A. 1st observation 2 f; ! , -. 1st observation 2 lN ! , .. 2nd observation 2 ly ! , /. 2nd observation 2 lN ! , ). 3rd observation 2 fy ! , 1. A!1 -!1 .!1 /! 2. A!1 -! 3. A! .! )!1

/!1 )!

-!1 .!1 /!1 )!1

6. A!1 -!1 .!1 /!1 )! >. A!1 -!1 .! /!1 )!

1FH. #hich SAS function below returns the value QT)STQ, 1. S.A' 0QTE:S :S <&ST A T)STQ5 >1 2. =%.AT) 0QTE:S :S <&ST A T)STQ5 >1 3. S&-ST* 0QTE:S :S <&ST A T)STQ5 QT)STQ1 6. :'/)P 0QTE:S :S <&ST A T)STQ5 >1 >. :'/)P 0QTE:S :S <&ST A T)STQ5 QT)STQ1 1H . This program generates output; proc format; value 4birds 7 7!7missing7 other!7not missing7; run; data ;; do i!1 to 3;

if i!1 then bird!7 7; if i!2 then bird!7cardinal7; if i!3 then bird!7wren7; end; proc print; proc freM; table bird; format bird 4birds.; run; *eferring to the program above5 what are the values of YAZ through Y)Z in the following output, %utput: %-S : YAZ Y-Z -:*/ Y.Z

-:*/ ?reMuency (ercent 22222222222222222222222222222 Y/Z Y)Z

1. A!1 -!6 .!wren /!not missing )!1 2. A!1 -!3 .!# /!missing )!1 3. A!3 -!3 .!blanA /!missing )!1 6. A!1 -!3 .!wren /!wren )!1 >. A!1 -!6 .!# /!not missing )!1

1-1" <he ,!ll!win+ is an e7ample !,"""" )=h!!se !ne data empl!5ee; in,ile >empl!5ee"dat>; ?@ Assumin+ direct!r5Abased s5stem @? input id 4$" name 4./" 2B/ l!cale 41/"; run;

A" Cist D" =!lumn =" E!rmatted '" Mi7ed F" 6tandard ans# b 1-." <rue !r Ealse""")=h!!se !ne <he e7tesi!n !, G"sasG is reHuired ,!r sas pr!+ram ,iles" A" <rue D" Ealse Ans# b 1-B" Which !, the ,!ll!win+ are valid statements c!ncernin+ readin+ raw data ,iles usin+ list input# )=h!!se all that appl5 A" <he 'CM= is an !pti!n ,!r the in,ile statement ,!r speci,5in+ delimiters" D" All variables have a de,ault len+th !, 8 b5tes" =" When the input statement runs int! an endA!,Aline marIer* it st!ps readin+ data even th!u+h there are m!re ,ields speci,ied" '" J!u use a 4 a,ter a variable name t! speci,5 a character variable" F" Eields are read ,r!m le,t t! ri+ht" Ans# a*d*e 1-3" Kiven the ,!ll!win+ raw data ,ile* !,,ices"dat* in a direct!r5Abased s5stem* which data step w!uld create a 6A6 data set with !ne !bservati!n ,!r each re+i!n# )=h!!se Lne 11..BB3 1.B35$78-/1.B35$78-/1.B35$78-/1.B35$78-/ Fast Mar5land Merm!nt Maine =entral &llin!is &!wa Nansas Miss!uri West =ali,!rnia Washin+t!n A" data !,,ices; in,ile >!,,ices"dat> st!p!ver; input re+i!n 4 state1Astate3 4; run; D" data !,,ices; in,ile >!,,ices"dat> miss!ver; input re+i!n 4 )state1Astate3 )4 ; run; =" data !,,ices; in,ile >!,,ices"dat> delim=G G; input re+i!n 4 state1 4 state. 4 stateB 4 state3 4; run; '" data !,,ices; in,ile >!,,ices"dat>; input re+i!n 4 state1Astate3 4"; run; F" %!ne !, the ab!ve"

Ans# e 1-5" <he d!uble trailin+ G22G in an input statement""")=h!!se all that appl5 A" h!lds the current data line in the bu,,er ,!r an!ther input statement t! pr!cess D" can be used t! read multiple !bservati!ns ,r!m a sin+le data line =" l!ads a new rec!rd int! the input bu,,er i, an endA!,Arec!rd is ,!und in the current rec!rd '" is a s5nta7 err!r" F" %!ne !, the ab!ve" Ans# a* b 1-$" Which 6A6 statement bel!w will chan+e the characteristics !, a variable i, it was used in a data step? A" 6=A% D" A<<R&D =" ELRMA< '" 1(< F" ARRAJ Ans# d 1-7" Which O variable has a value !, 1 at the end !, an input ,ile? A" F%' = O D" LD6 = O =" FLE = O '" CA6<LD6 = O F" %LLD6 = O Ans# a 1-8" Kiven a data ,ile with 1// c!lumns !, data* 5!u !nl5 need t! read in the ,irst 7/ c!lumns" Which !, the ,!ll!win+ c!uld 5!u use# A" in,ile 7 line = 7/; D" in,ile 7 len+th = 71; =" in,ile 7 miss!ver = 7/; '" in,ile 7 ls=7/; F" in,ile 7 linesi8e=7/; 1--" &n the ,!ll!win+ c!de sample# data 758; in,ile abc; input h i :B P; run; What d!es the :B d!? A" &t m!ves the p!inter d!wn B rec!rds D" &t m!ves the c!lumn p!inter t! c!lumn B =" &t adds B t! the value read int! variable i '" &t advances the c!lumn p!inter B places F" &t advances the c!lumn p!inter 3 places Ans# d .//" What d!es the ,!ll!win+ 6A6 statement d!? i, l!cati!n =# >=>; A" &t selects the !bservati!n i, there is a >=> in the l!cati!n value" D" &t selects the !bservati!n i, there is a >=> at the ,irst p!siti!n in the l!cati!n value" =" &t selects the !bservati!n i, the l!cati!n value is >=>" '" &t selects the !bservati!n i, the l!cati!n value c!ntains a l!wercase >c>" F" %!ne !, the ab!ve* it>s a t5p!"

Ans# b

./1" <he ,!ll!win+ pr!+ram is submitted" data test; input name 4 a+e; cards; Q!hn :B5 ;run; Which values are st!red in the !utput data set? A" name a+e Q!hn B5 D" name a+e Q!hn )missin+ value =" name a+e )missin+ value )missin+ value '" <he 'A<A step ,ails e7ecuti!n due t! data err!rs" Ans# a ./."<he ,!ll!win+ !bservati!n is st!red in a 6A6 data set named FM1CLJFF6# C%AMF E%AMF QLD=L'F AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Whitle5 6am na1 &, the 'A<A step bel!w is e7ecuted* what will be the value !, the variable QLD'F6= in the !utput 6A6 data set when this !bservati!n is pr!cessed# data navi+ate; set empl!5ees; i, P!bc!de = >%A1> then P!bdesc = >%avi+at!r>; run; A" navi+at!r D" %avi+at!r =" %AM&KA<LR '" a missin+ value ans# d ./B"<he ,!ll!win+ 6A6 pr!+ram is submitted# pr!c ,!rmat; value sc!re 1 A 5/ = >Eail> 51 A 1// = >1ass>; run; Which !ne !, the ,!ll!win+ 1R&%< pr!cedure steps c!rrectl5 applies the ,!rmat? A" pr!c print data = sasuser"class; var test; ,!rmat test sc!re; run; D" pr!c print data = sasuser"class; var test; ,!rmat test sc!re"; run;

=" pr!c print data = sasuser"class ,!rmat = sc!re; var test; run; '" pr!c print data = sasuser"class ,!rmat = sc!re"; var test; run; Ans# b ./3 Kiven the ,!ll!win+ 'A<A step# data l!!p; 7 = /; d! inde7 = 1 t! 5 b5 .; 7 = inde7 ; end; run; (p!n c!mpleti!n !, e7ecuti!n* what are the values !, the variables O and &%'FO in the 6A6 data set named CLL1? A" 7 = B* inde7 = B D" 7 = B* inde7 = 3 =" 7 = 5* inde7 = 5 '" 7 = 5* inde7 = $ F" 7 = 5* inde7 = 7 Ans# F ./5 Kiven that the data set named L%F c!ntains 1/ !bservati!ns and the data set named <WL c!ntains 1/ !bservati!ns* h!w man5 !bservati!ns will be c!ntained in the data set named =LMD&%F that is created in the ,!ll!win+ 'A<A step? data c!mbine; set !ne tw!; run; A" 1/ D" ./ =" /* the 'A<A step will ,ail due t! s5nta7 err!rs '" 1/ t! ./* dependin+ !n h!w man5 !bservati!ns match ans# b ./$" A ,!rmat statement sh!uld be speci,ied be,!re the =AR'6 statement when we read internal raw data" a" <rue b" Ealse Ans# true ./7" An e7ternal ,ile with a ma7imum rec!rd len+th !, ..5 is read int! 6A6 in a 'A<A step" 6elect all statements that reads the data c!rrectl5" a" &%E&CF R=#Sm5data"dat CRF=C=.///; b" &%E&CF R=#Sm5data"dat CRF=C=..5; c" &%E&CF R=#Sm5data"dat ; ./8" 6elect the Ealse statement ab!ut Cist &nput meth!d !, readin+ data a" Reads data separated b5 several spaces" b" '!es n!t sIip !ver unwanted values in the input data" c" Reads a date"

Ans# c ./-" =!lumn &nput st5le can read a character data value with space embeddin+ a" <rue b" Ealse Ans# a .1/" A standard numeric data in 6A6 can c!ntain a RAR )ne+ative si+n and RF ,!r scienti,ic n!tati!ns a" <rue b" Ealse Ans# a .11" A n!n standard data )%umbers with c!mma* dates liIe /BAL=<A.//5 &%1(< st5les )select all c!rrect answers a" E!rmatted &nput b" M!di,ied Cist &nput c" (sin+ &n,!rmats in &%1(< statement .1." Kiven the line !, raw data# 11..BB 6=L'F6 T M % And the data statement# &%1(< 2>6=L'F6> statusc!des #41/"; When e7ecuted in a 'A<A step c!rrectl5* what value the variable R6tatusc!des +ets? a" T b" T M % c" " )Missin+ ans# a can be read with the ,!ll!win+

.1B" <he ,!ll!win+ statement is submitted# 'ata <est; &%1(< accnum 4 ? ,name 4 lname 4 ; cards; 1...B.3. Q!hn5 6mith 1eter 6mith <h!mas Q!seph ;run; <he !utput dataset will sh!w which !, the ,!ll!win+? a" accnum ,name lname 1...B.3. Q!hn5 6mith b" accnum ,name lname 1...B.3. 1eter 6mith c" %!ne !, the ab!ve

ans# b .13" <he ,!ll!win+ statement is submitted# 'ata <est; &%1(< accnum 4 U. ,name 4 lname 4 ; cards; 1...B.3. Q!hn5 6mith 1eter 6mith <h!mas Q!seph ;run; <he !utput dataset will sh!w which !, the ,!ll!win+? a" accnum ,name lname 1...B.3. Q!hn5 6mith b" accnum ,name lname 1...B.3. 1eter 6mith c" %!ne !, the ab!ve ans# b .15" <he ,!ll!win+ &%1(< statements are submitted# 'ata <est; &%1(< accnum 4 ,name 4 lname 4 22 ; cards; 1...B. Q!hn5 6mith 1B.B3B 1eter 6mith 13.3B3 <h!mas Q!seph; run; Which !, the ,!ll!win+ statement is c!rrect? a" Lutput rec!rd set will have !nl5 !ne rec!rd b" Lutput rec!rd set will have B rec!rds c" 'ata step inc!mplete due t! inc!rrect s5nta7 ans# b .1$" 'ata,ile Rc#Sm5data"dat c!ntains acc!unt number* ,irst name and last name !, acc!unt h!lders with ,!ll!win+ structure" 1...B. Q!hn5 6mith 13.3B3 <h!mas 15.5B5 'an 1aul Which statement bel!w reads the data c!rrectl5 int! 6A6" a" 'ata <est; &%E&CF >c#Sm5data"dat> M&66LMFR; &%1(< accnum 4 1A$ ,name 4 8A13 lname 4 1$A./; run; b" 'ata <est; &%E&CF >c#Sm5data"dat> <R(%=LMFR; &%1(< accnum 4 1A$ ,name 4 8A13 lname 4 1$A./; run; c" 'ata <est; &%E&CF >c#Sm5data"dat> ;

&%1(< accnum 4 ,name 4 lname 4; run; ans# c with miss!ver !pti!n .17" <he ,!ll!win+ statement is submitted 'ata <est; &%E&CF >c#Sm5data"dat; &%1(< client0id 4 1AB 2; &E client0id >Q=1> then delete; &%1(< accnum 4 3A8 ,name 4 -A13 lname 4 1$A./; run; V!w man5 c!lumns will be there in dataset R<est ? a" %!ne b" B c" 3 ans# ma5 be a .18" An e7ternal data ,ile has acc!unt !pen date in the ,!ll!win+ ,!rmat " /1A1BA-5 /1A13A-$ /1A15A-7 Which !, the ,!ll!win+ is a c!rrect &%1(< statement in 'A<A step t! read this data" a" &%1(< Acc!unt0n! mmdd558" ; b" &%1(< Acc!unt0n! mmdd55$" ; c" &%1(< Acc!unt0n! ddmm558" ; ans# a .1-" <he ,!ll!win+ statements are submitted 'ata <est; t!da5 = >./dec.//5>d; ,!rmat t!da5 mmdd551/"; run; Which !, the ,!ll!win+ statement is true ? a" R<!da5 variable displa5s liIe R1.?./?.//5 b" 'ata step n!t e7ecuted due t! wr!n+ ,!rmat Rmmdd55" c" <!da5 is displa5ed as R./'F=.//5 ans# a ../" E!ll!win+ statements are submitted# pr!c e7p!rt data = Acc!unt0per, !ut,ile = >d#Ste7t1"csv>; run;

pr!c e7p!rt data = Acc!unt0per, !ut,ile = >d#Ste7t."csv> 'DM6 ='CM RF1CA=F; 'FC&M&<FR =>*>; run; 6elect all ,alse statements# a" <here are tw! ,iles * te7t1"csv and te7t."csv * created in d#S b" D!th te7t1 and te7t. ,iles have the same data values delimited b5 a c!mma c" <e7t1 data ,ile will have a spaceAdelimited data as a standard 6A6 !utput" d" Lnl5 te7t."csv is created with values delimited b5 a c!mma" Ans# ma5 be d %!te# the pr!+rams in the e7ample e e7pects n! err!rs due t! impr!per use !, ;* R* etc"

..1" Eile =#Sm5data"dat c!ntains 1// c!mplete rec!rds and the ,!ll!win+ pr!+ram is submitted" !pti!ns !bs=1/; 'ata <est; &%E&CF >c#Sm5data"dat> ,irst!bs=B; &%1(< accnum 4 ,name 4 lname 4; run; Which !, the ,!ll!win+ statement is c!rrect? a" <est data set will have -8 r!ws b" <est dataset will have ,irst 1/ !bservati!ns c" <est dataset will have 1/ !bservati!ns read startin+ ,r!m third data line in m5data"dat d" <est dataset will have 8 !bservati!ns read startin+ ,r!m third data line in m5data"dat Ans# ma5 be d ..." <he ,!ll!win+ pr!+ram is submitted t! read a delimited ,ile 'ata <est; &%E&CF >c#Sm5data"dat> 'CM=>4> '6' ; &%1(< accnum 4 ,name 4 lname 4; run; What R'6' Ie5w!rd d!es here? )6elect all c!rrect answers a" &t d!es n!t treat R4 character as part !, the data value and treat it as delimiter" b" &t rec!+ni8e tw! c!nsecutive R4 characters as a missin+ value ,!r the variable read c" &, data value is speci,ied in Hu!tes with embedded R4 character '6' !pti!n treats it as part !, the data" Ans# b ..B" A 1RL= 'A<A<6F<6 is used as ,!ll!ws)assumpti!n# all libraries are and datasets are e7istin+ # pr!c datasets librar5=m5lib details; c!p5 !ut=rl!c; select sc!redata; delete tensi!n ; run; Which statement bel!w e7plains the !perati!ns ab!ve m!st c!rrectl5? a" &t lists all 6A6 data ,iles with ,ile si8e and date m!di,ied in Rm5lib librar5 and maIes a c!p5 !, Rsc!redata ,ile in Rrl!c librar5 and deletes Rtensi!n dataset""

b" &t lists all 6A6 data ,iles with ,ile si8e and date m!di,ied in Rm5lib librar5 and deletes Rtensi!n ,ile ,r!m Rrl!c librar5" c" &t lists all 6A6 data ,iles with ,ile si8e and date m!di,ied in Rm5lib librar5 and maIes a c!p5 !, Rsc!redata ,ile in Rrl!c librar5 and als! c!pies the Rsc!redata ,ile in Rrl!c librar5" d" &t lists all sas data ,iles with ,ile si8e and date m!di,ied in Rm5lib librar5 and maIes a c!p5 !, Rsc!redata ,ile in Rrl!c librar5" ..3" <he ,!ll!win+ pr!+ram is submitted" Which is a ,alse statement ab!ut the !utput !, this pr!+ram? pr!c c!ntents data=sc!redata; run; a" 1rints U !, !bservati!ns in Rsc!redata b" 1rints a snapsh!t !, the data int! the screen" c" 1rints the date Rsc!redata was created d" Cists all labels ass!ciated with variables in Rsc!redata

..5" <he ,!ll!win+ line !, c!de is used in a 6A6 data step " 'ata 77; 6et 55; attrib status0c!des len+th=43 label =>6tatus =!des> ,!rmat =4upcase8"; run; &, 55 has a variable names status0c!des and the user wants the attributes t! be chan+ed in 77 " Will this statement chan+e the len+th* label and ,!rmat in 77 dataset? a" JF6 b" %L c" %! 6u,,icient &n,!rmati!n

..$" <he bel!w three pr!+ram bl!cIs are submitted A 'ata tar+et0data ; 6et base0data))Ieep = var1 var. varB ; Run; D 'ata tar+et0data ; 6et base0data; Ieep = var1 var. varB ; Run; = 'ata tar+et0data )Ieep = var1 var. varB ; 6et base0data; Run; &, the user needs !nl5 var1* var. and varB t! w!rI with* which step is m!st e,,icient? a" A b" D c" = d" AWD e" %!ne

ans# a

..7" <he ,!ll!win+ pr!+ram is submitted )Assumpti!n is !s0d!llars is an e7istin+ dataset with client +r!ups )client0+r!up and d!llar !utstandin+ )!s ,ields" " 'ata test; 6F< !s0d!llars F%'=E&% ; DJ client0+r!up; t0!s :!s; &E CA6<"clinet0+r!up <VF% 'L ; +0!s :t0!s ; t0!s=/;F%';run; What this pr!+ram d!es? a" =!mputes the +r!ss !utstandin+ acr!ss the +r!ups and st!re it in +0!s variable* last r!w" b" =!mputes the !ustandin+s ,!r client +r!ups and retain them in t0!s variable c" %!ne !, the ab!ve"

..8" <he ,!ll!win+ pr!+ram was submitted t! 6A6 data temp; len+th m50number 4 3; input m50number; cards; 1.B3 ///;run; data new)dr!p=7 ; set temp)rename=)m50number=7 ; m50number=input)7*best3" ;run; pr!c print data=new;run; Whats the !utput w!uld be? A Lbs m50number 1 1.B3 . D Lbs m50number 1 1.B3 . ///= Lbs m50number " " Ans# A ..-" <he ,!ll!win+ pr!+ram is submitted# 7=>./Pan-3>d; 5=Htr)7 ; put 5=;

What value w!uld be printed t! the 6A6 l!+? a" 1 b" . c" B d" %!ne ans# a .B/" <he ,!ll!win+ pr!+ram submitted# data 77; date1=1..5-1; date.=put)date1*8$" ;run; Whats the data t5pe !, date1 and date . ? a" 'ate1 =haracter* 'ate . %umeric b" 'ate1 numeric* 'ate . character c" 65nta7 err!r* n!t e7ecuted Ans# b .B1" <he ,!ll!win+ statement ,!rms a part !, 6A6 dataset )n! s5nta7 err!rs 'ata 77; 6et 55; arra5 wei+ht wt1Awt5/; d! i=1 t! 5/; i, wei+htXiY=--- then wei+htXiY=missin+; end; run; 6elect all c!rrect statements bel!w# a" =reates a variable wei+ht and assi+ns w1Awt5/ )wt1* wt.* wtB etc b" Mariables named wt1Awt5/ e7ist in the 55 data set" c" &, an5 !, the ,ields in wt1Awt5/ have a value !, R--- then it will be reset with a Rmissin+ " d" Fvaluated all 5/ ,ields and the entire table l!!Iin+ ,!r value R--- in an5 !, the ,ields ans# b*c .B." <he ,!ll!win+ pr!+ram is submitted# pr!c rep!rt data =77 n!wind!ws headline headsIip ; <itle >6ummar5 acr!ss +r!ups; c!lumn s0+ % )!s c! * MFA% ; de,ine s0+ ?+r!up; run; Whats the !bPective !, usin+ MFA%? a" =!mpute mean )Avera+e !, variables L6 and =L b" =!mpute mean and %)c!unt !, s0+ and MFA% !, L6 and =L c" =!mpute mean and %)c!unt !, s0+ and MFA% !, L6 and =L b5 s0+ +r!ups"

233. How many observations and variables does the data set below contain? Name Picker Fletcher Romano Choi a. b. c. d. F M Sex M Age 32 28 . 42

3 observations, 4 variables 3 observations, 3 variables 4 observations, 3 variables can't tell beca se some val es are missing

234. How many !rogram ste!s are exec ted when the !rogram below is !rocessed? data user.tables; infile jobs; input date name $ job $; run; proc sort data=user.tables; by name; run; proc print data=user.tables; run; a. b. c. d. three "o r "ive six

23#. $hat ty!e o" variable is the variable AcctN m in the data set below? AcctN m 3456_1 2451_2 Romano Choi a. b. c. d. F M n meric character can be either character or n meric can't tell "rom the data shown %alance M

23&. $hat ty!e o" variable is the variable $ear in the data set below? %rand Acme Ajax Atlas A. %. '. (. $ear 43 34 . n meric character can be either character or n meric can't tell "rom the data shown

23). $hich o" the "ollowing variable names is valid? a. 4%irth(ate b. *'ost c. +,tems+ d. -ax./ate 230. $hich o" the "ollowing "iles is a !ermanent SAS "ile? a. Sashel .Pr!Sale b. Sas"ser.M#Sales c. Pro$its.%"arter1 d. all o" the above 231. ,n a (A-A ste!, how can yo re"erence a tem!orary SAS data set named 2orecast? a. Forecast b. &ork.Forecast c. Sales.Forecast 3a"ter assigning the libre" Sales4 d. only a and b above 245. $hat is the de"a lt length "or the n meric variable %alance? Name Adams 7eller 8artine9 Noble a. b. c. d. # & ) 0 %alance 65#.)3 65).01 1).4# 602.#5

246. How many statements does the "ollowing SAS !rogram contain? proc print data=new.prodsale label double; var state day price1 price2; where state='NC'; label state='Name of run; a. b. c. d. three "o r "ive six tate';

242. $hat is a SAS data library? a. a collection o" SAS "iles, s ch as SAS data sets and catalogs b. in some o!erating environments, a !hysical collection o" SAS "iles c. in some o!erating environments, a logically related collection o" SAS "iles d. all o" the above 243. ," yo s bmit the "ollowing !rogram, how does the o t! t loo:? o!tions !agesi9e;## non mber< !roc tab late data;clinic.admit< class actlevel< var age height weight< table actlevel,3age height weight4=mean< r n< o!tions linesi9e;05< !roc means data;clinic.heart min max maxdec;6< var arterial heart cardiac rinary< class s rvive sex< r n< a. -he >/?' 8@ANS o t! t has a !rint line width o" 05 characters, b t the >/?' -A%ABA-@ o t! t has no !rint line width. b. -he >/?' -A%ABA-@ o t! t has no !age n mbers, b t the >/?' 8@ANS o t! t has !age n mbers. c. @ach !age o" o t! t "rom both >/?' ste!s is ## lines long and has no !age n mbers, and the >/?' 8@ANS o t! t has a !rint line width o" 05 characters. d. -he date does not a!!ear on o t! t "rom either >/?' ste!.

244. ,n order "or the date val es 5#8ay61## and 548ar254& to be read correctly, what val e m st the C@A/'A-?22; o!tion have? a. a val e between 614) and 61#4, incl sive b. 61## or higher c. 614& or higher d. any val e 24#. $hen yo s!eci"y an engine "or a library, yo are always s!eci"ying a. the "ile "ormat "or "iles that are stored in the library. b. the version o" SAS that yo are sing. c. access to other so"tware vendors' "iles. d. instr ctions "or creating tem!orary SAS "iles. 24&. $hich statement !rints a s mmary o" all the "iles stored in the library named Area#6? a. !roc contents data;area#6.+all+ nods< b. !roc contents data;area#6 +all+ nods< c. !roc contents data;area#6 +all+ noobs< d. !roc contents data;area#6 +all+.nods< 24). -he "ollowing >/?' >/,N- o t! t was created immediately a"ter >/?' -A%ABA-@ o t! t. $hich SAS system o!tions were s!eci"ied when the re!ort was created? 6 65D53 2riday, 8arch 6), 2555

Act ?bs ,( Height $eight Bevel 2ee

6 24#0 )2 2 24&2 && 3 2#56 &6 4 2#23 &3 # 2#31 )6 & 2#44 )& ) 2##2 &) 0 2### )5

6&0 H,7H 0#.25 6#2 H,7H 624.05 623 B?$ 641.)# 63) 8?( 641.)# 6#0 B?$ 624.05 613 H,7H 624.05 6#6 8?( 641.)# 6)3 8?( 641.)#

1 2#&3 )3 6#4 B?$ 624.05 a. ?%S;, (A-@, and N?NA8%@/ b. >A7@N?;6 and (A-@ c. NA8%@/ and (A-@ only d. none o" the above

240. $hich o" the "ollowing !rograms correctly re"erences a SAS data set named SalesAnalysis that is stored in a !ermanent SAS library? a. b. c. d. e. ". g. h. i. G. :. data saleslibrary.salesanalysis< set mydata.E arter6sales< i" salesF655555< r n< data mysales.totals< set sales+11.salesanalysis< i" totalsalesF#5555< r n< !roc !rint data;salesanalysis.E arter6< var sales salesre! month< r n<

l. m. n.

!roc "reE data;6111data.salesanalysis< tables E arter=sales< r n<

241. $hich time s!an is sed to inter!ret two.digit year val es i" the C@A/'A-?22; o!tion is set to 61#5? a. 61#5.2541 b. 61#5.25#5 c. 6141.25#5 d. 61#5.2555 2#5. Ass ming yo are sing SAS code and not s!ecial SAS windows, which one o" the "ollowing statements is "alse? a. B,%NA8@ statements can be stored with a SAS !rogram to re"erence the SAS library a tomatically when yo s bmit the !rogram. b. $hen yo delete a libre", SAS no longer has access to the "iles in the library. However, the contents o" the library still exist on yo r o!erating system. c. Bibre"s can last "rom one SAS session to another. d. Co can access "iles that were created with other vendors' so"tware by s bmitting a B,%NA8@ statement. 2#6. $hat does the "ollowing statement do? libname osiris s!ss 'cDHmy"ilesHsasdataHdata'< a. de"ines a library called S!ss sing the ?S,/,S engine b. de"ines a library called ?siris sing the S>SS engine c. de"ines two libraries called ?siris and S!ss sing the de"a lt engine d. de"ines the de"a lt library sing the ?S,/,S and S>SS engines

2#2. $hat does the "ollowing ?>-,?NS statement do? o!tions !agesi9e;6# nodate< a. s !!resses the date and limits the !age si9e o" the log b. s !!resses the date and limits the vertical !age si9e "or text o t! t c. s !!resses the date and limits the vertical !age si9e "or text and H-8B o t! t d. s !!resses the date and limits the hori9ontal !age si9e "or text o t! t 2#3. As yo a. b. c. d. write and edit SAS !rograms, itIs a good idea to begin (A-A and >/?' ste!s in col mn one. indent statements within a ste!. begin /AN statements in col mn one. all o" the above.

2#4. $hat s ally ha!!ens when a syntax error is detected? a. SAS contin es !rocessing the ste!. b. SAS contin es to !rocess the ste!, and the SAS log dis!lays messages abo t the error. c. SAS sto!s !rocessing the ste! in which the error occ rred, and the SAS log dis!lays messages abo t the error. d. SAS sto!s !rocessing the ste! in which the error occ rred, and the ? t! t window dis!lays messages abo t the error. 2##. A syntax error occ rs when a. some data val es are not a!!ro!riate "or the SAS statements that are s!eci"ied in a !rogram. b. the "orm o" the elements in a SAS statement is correct, b t the elements are not valid "or that sage. c. !rogram statements do not con"orm to the r les o" the SAS lang age. d. none o" the above. 2#&. How can yo tell whether yo have s!eci"ied an invalid o!tion in a SAS !rogram? a. A log message indicates an error in a statement that seems to be valid. b. A log message indicates that an o!tion is not valid or not recogni9ed. c. -he message J>/?' r nningJ or J(A-A ste! r nningJ a!!ears at the to! o" the active window. d. Co can't tell ntil yo view the o t! t "rom the !rogram. 2#). $hich o" the "ollowing !rograms contain a syntax error? a. b. c. d. e. ". g. h. i. G. !roc sort data;sas ser.mysales< by region< r n< dat sas ser.mysales< set mydata.sales11< r n< !roc !rint data;sas ser.mysales label< label region;'Sales /egion'< r n< none o" the above.

2#0. $hat does the "ollowing log indicate abo t yo r !rogram? !roc !rint data;sas ser.cargo11 var origin dest cargorev< 22 )& @//?/ 22.322D Syntax error, ex!ecting one o" the "ollowingD <, 3, (A-A, (?A%B@, H@A(,N7, BA%@B, N, N??%S, ?%S, /?AN(, /?$S, S>B,-, S-CB@, AN,2?/8, $,(-H. @//?/ )&.322D Syntax error, statement will be ignored. 66 r n<

a. b. c. d.

SAS identi"ies a syntax error at the !osition o" the KA/ statement. SAS is reading KA/ as an o!tion in the >/?' >/,N- statement. SAS has sto!!ed !rocessing the !rogram beca se o" errors. all o" the above

2#1. $hich >/?' >/,N- ste! below creates the "ollowing o t! t? (ate 548A/11 5#8A/11 5&8A/11 5)8A/11 508A/11 518A/11 658A/11 a. b. c. d. ?n 232 160 163 241 183 211 167 'hanged 18 4 14 9 11 18 7 2light 219 219 219 219 219 219 219

roc !rint data;"lights.lag ardia noobs< var on changed "light< where onF;6&5< r n<

e. ". g. h. i. G. :. l. m. n. o. !. E. r. s.

!roc !rint data;"lights.lag ardia< var date on changed "light< where changedF3< r n< !roc !rint data;"lights.lag ardia label< id date< var boarded trans"erred "light< label boarded;'?n' trans"erred;''hanged'< where "light;'261'< r n< !roc !rint "lights.lag ardia noobs< id date< var date on changed "light< where "light;'261'< r n<

2&5. $hich o" the "ollowing >/?' >/,N- ste!s is correct i" labels are not stored with the data set? a. b. c. d. e. ". g. h. i. !roc !rint data;allsales.totals label< label region0;'/egion 0 Cearly -otals'< r n< !roc !rint data;allsales.totals< label region0;'/egion 0 Cearly -otals'< r n< !roc !rint data allsales.totals label noobs< r n< !roc !rint allsales.totals label< r n<

2&6. $hich o" the "ollowing statements selects "rom a data set only those observations "or which the val e o" the variable Style is /AN'H, S>B,-, or -$?S-?/C? a. where style;'/AN'H' or 'S>B,-' or '-$?S-?/C'< b. where style in '/AN'H' or 'S>B,-' or '-$?S-?/C'< c. where style in 3/AN'H, S>B,-, -$?S-?/C4< d. where style in 3'/AN'H','S>B,-','-$?S-?/C'4<

2&2. ," yo want to sort yo r data and create a tem!orary data set named 'alc to store the sorted data, which o" the "ollowing ste!s sho ld yo s bmit? a. b. c. d. e. ". g. h. i. G. :. !roc sort data;wor:.calc o t;"inance.dividend< r n< !roc sort dividend o t;calc< by acco nt< r n< !roc sort data;"inance.dividend o t;wor:.calc< by acco nt< r n< !roc sort "rom "inance.dividend to calc< by acco nt< r n<

2&3. $hich o!tions are sed to create the "ollowing >/?' >/,N- o t! t? 63D2) 8onday, 8arch 22, 6111

>atient

Arterial

Heart

'ardiac

Arinary

253

00

1#

&&

665

#4

03

603

1#

&&4

)2

666

332

62

265

)4

1)

3&1

656

05

635

216

a. b.

the (A-@ system o!tion and the BA%@B o!tion in >/?' >/,Nthe (A-@ and N?NA8%@/ system o!tions and the (?A%B@ and N??%S o!tions in >/?' >/,Nc. the (A-@ and N?NA8%@/ system o!tions and the (?A%B@ o!tion in >/?' >/,N-

d.

the (A-@ and N?NA8%@/ system o!tions and the N??%S o!tion in >/?' >/,Nse in a >/?' >/,N- ste! to create this o t! t? $al:Log/ n 37 41 52 61 49 245 91 102 98 118 88 41) Swim 83 27 19 22 29 605

2&4. $hich o" the "ollowing statements can yo 8onth 01 02 03 04 05 ,nstr ctors 1 2 1 1 3 0 a. b. c. d. e. ". g. var month instr ctors< Aer'lass

s m instr ctors aerclass wal:Gogr n swim< var month< s m instr ctors aerclass wal:Gogr n swim< var month instr ctors aerclass< s m instr ctors aerclass wal:Gogr n swim< all o" the above

2&#. $hat ha!!ens i" yo s bmit the "ollowing !rogram? !roc sort data;clinic.diabetes< r n< !roc !rint data;clinic.diabetes< var age height weight ! lse< where sex;'2'< r n< a. b. c. -he >/?' >/,N- ste! r ns s ccess" lly, !rinting observations in their sorted order. -he >/?' S?/- ste! !ermanently sorts the in! t data set. -he >/?' S?/- ste! generates errors and sto!s !rocessing, b t the >/?' >/,Nste! r ns s ccess" lly, !rinting observations in their original 3 nsorted4 order. d. -he >/?' S?/- ste! r ns s ccess" lly, b t the >/?' >/,N- ste! generates errors and sto!s !rocessing.

2&&. ," yo s bmit the "ollowing !rogram, which o t! t does it create? !roc sort data;"inance.loans o t;wor:.loans< by months amo nt< r n< !roc !rint data;wor:.loans noobs< var months< s m amo nt !ayment< where monthsM3&5< r n< a. 8onths 12 24 36 48 Amo nt $3,500 $8,700 $10,000 $5,000 *2),255 b. 8onths 12 24 36 48 Amo nt $3,500 $8,700 $10,000 $5,000 2),255 c. 8onths 12 48 24 36 Amo nt $3,500 $5,000 $8,700 $10,000 *2),255 >ayment $308.52 $128.02 $403.47 $325.02 *6,6&#.53 >ayment $308.52 $403.47 $325.02 $128.02 6,6&#.53 >ayment $308.52 $403.47 $325.02 $128.02 *6,6&#.53

d. 8onths 12 24 36 48 Amo nt $3,500 $8,700 $10,000 $5,000 >ayment $308.52 $403.47 $325.02 $128.02 *6,6&#.53 e. 2&). 'hoose the statement below that selects rows in which the amo nt is less than or eE al to *#555 the acco nt is 656N6512, or the rate eE als 5.51#. a. b. c. d. e. ". g. h. where amo nt M; #555 and acco nt;'656.6512' or rate ; 5.51#< where 3amo nt le #555 and acco nt;'656.6512'4 or rate ; 5.51#< where amo nt M; #555 and 3acco nt;'656.6512' or rate eE 5.51#4< where amo nt M; #555 or acco nt;'656.6512' and rate ; 5.51#<

2&0. $hat does >/?' >/,N- dis!lay by de"a lt? a. >/?' >/,N- does not create a de"a lt re!ort< yo m st s!eci"y the rows and col mns to be dis!layed. b. >/?' >/,N- dis!lays all observations and variables in the data set. ," yo want an additional col mn "or observation n mbers, yo can reE est it. c. >/?' >/,N- dis!lays col mns in the "ollowing orderD a col mn "or observation n mbers, all character variables, and all n meric variables. d. >/?' >/,N- dis!lays all observations and variables in the data set, a col mn "or observation n mbers on the "ar le"t, and variables in the order in which they occ r in the data set. 2&1. $hich SAS statement associates the "ilere" 'rime with the raw data "ile 'DHStatesH(ataH'rime? a. "ilename crime 'cDHstatesHdataHcrime'< b. "ilename crime cDHstatesHdataHcrime< c. "ilere" crime 'cDHstatesHdataHcrime'< d. "ilename 'cDHstatesHdataHcrime' crime< 2)5. 2ilere"s remain in e""ect ntil a. yo change them. b. yo cancel them. c. yo end yo r SAS session. d. all o" the above

2)6. $hich statement identi"ies the name o" a raw data "ile to be read with the "ilere" >rod cts and s!eci"ies that the (A-A ste! read only records 6N6#? a. in"ile !rod cts obs 6#< b. in"ile !rod cts obs;6#< c. in! t !rod cts obs;6#< d. in! t !rod cts 6.6#< 2)2. $hich o" the "ollowing !rograms correctly writes the observations "rom the data set below to a raw data "ile? SAS Data Set Work.Patients ,( 2354 6620 442# 630) 1562 &362 #430 3)00 162# 3430 a. b. c. d. e. ". g. h. i. G. :. l. m. n. o. !. E. r n< data +n ll+< set wor:.!atients< "ile cDHclinicH!atientsHre"errals.dat< ! t id 6.4 sex & age 0.1 height 66.62 r n< data re"errals.dat< set wor:.!atients< in! t id 6.4 sex & age 0.1 height 66.62 weight 64.6& ! lse 60.25< Sex 2 8 2 2 2 8 2 8 2 8 data +n ll+< set wor:.!atients< in"ile 'cDHclinicH!atientsHre"errals.dat'< in! t id 6.4 sex & age 0.1 height 66.62 weight 64.6& ! lse 60.25< Age 6& 43 40 #) 31 #2 42 30 #& 6# Height &6 )6 && &4 &3 )2 &2 )3 &4 && $eight 652 260 6&2 642 6#) 245 6&0 234 6#1 645 > lse 655 )& 05 )5 &0 )) 03 )6 )5 &)

r. s. t. . v. w. x. y. 9. r n< r n<

weight 64.6& ! lse 60.25<

data +n ll+< set wor:.!atients< "ile 'cDHclinicH!atientsHre"errals.dat'< ! t id 6.4 sex & age 0.1 height 66.62 weight 64.6& ! lse 60.25<

2)3. $hich raw data "ile can be read sing col mn in! t? a.

b.

c.

d.

all o" the above

2)4. $hich !rogram creates the o t! t shown below?

?bs 6 2 3

,( 342) 643& 2062

BastName 'hen (avis Oing

2irstName Steve Bee Kic:y

'ity /aleigh Atlanta 8em!his

?bs 4 a. b. c. d. e. ". g. h. i. G. :. l. m. n. o. !. E. r. s. t. . v.

,( 6&#3

BastName Sanche9

2irstName Lac:

'ity Atlanta

data wor:.salesre!< in"ile em!data< in! t ,( * 6.4 BastName * &.62 2irstName * 64.60 'ity * 25.21< r n< !roc !rint data;wor:.salesre!< r n< data wor:.salesre!< in"ile em!data< in! t ,( * 6.4 Name * &.62 2irstName * 64.60 'ity * 25.21< r n< !roc !rint data;wor:.salesre!< r n< data wor:.salesre!< in"ile em!data< in! t ,( * 6.4 name6 * &.62 name2 * 64.60 'ity * 25.21< r n< !roc !rint data;wor:.salesre!< r n< all o" the above

2)#. $hich statement correctly reads the "ields in the "ollowing orderD Stoc:N mber, >rice, ,tem, 2inish, Style? 2ield Name Start 'ol mn @nd 'ol mn (ata -y!e Stoc:N mber 2inish Style ,tem >rice # 66 25 2) 6 1 60 24 32 3 character

character character character n meric

a. b. c. d. e. ". g. h.

in! t Stoc:N mber * 6.3 2inish * #.1 Style * 66.60 ,tem * 25.24 >rice 2).32< in! t Stoc:N mber * 6.3 >rice 2).32 ,tem * 25.24 2inish * #.1 Style * 66.60< in! t * Stoc:N mber 6.3 >rice 2).32 * ,tem 25.24 * 2inish #.1 * Style 66.60< in! t Stoc:N mber * 6.3 >rice * 2).32 ,tem * 25.24 2inish * #.1 Style * 66.60<

2)&. $hich statement correctly re.de"ines the val es o" the variable ,ncome as 655 !ercent higher? a. income;income=6.55< b. income;incomeP3income=2.554< c. income;income=2< d. income; =2< 2)). $hich !rogram correctly reads instream data? a. b. c. d. e. ". g. h. i. G. :. l. m. n. o. !. E. r. s. t. data "inance.newloan< in! t datalines< i" co ntry;'LA>AN'< 8onthAvg;amo ntQ62< 6110 AS 6110 AS 'A/S 614324.62 -/A'OS 642215.35 65403.44 22#55.#) 6#5&&.43

6110 'ANA(A 'A/S 6110 8@R,'? 'A/S 6110 LA>AN 'A/S < data "inance.newloan<

6110 'ANA(A -/A'OS 13#43.&4 6110 8@R,'? -/A'OS 65510.00 6110 LA>AN -/A'OS 45)55.34

in! t Cear 6.4 'o ntry * &.66 Kehicle * 63.60 Amo nt 25.20< i" co ntry;'LA>AN'< 8onthAvg;amo ntQ62< datalines< r n<

. v. w. x. y. 9.

data "inance.newloan< in! t Cear 6.4 'o ntry &.66 Kehicle 63.60 Amo nt 25.20< i" co ntry;'LA>AN'< 8onthAvg;amo ntQ62< datalines< 'A/S 614324.62 -/A'OS 642215.35 65403.44 22#55.#) 6#5&&.43

aa. 6110 AS bb. 6110 AS

cc. 6110 'ANA(A 'A/S ee. 6110 8@R,'? 'A/S "". gg. 6110 LA>AN 'A/S ii. GG. ::. ll. mm. nn. oo. < data "inance.newloan<

dd. 6110 'ANA(A -/A'OS 13#43.&4 6110 8@R,'? -/A'OS 65510.00

hh. 6110 LA>AN -/A'OS 45)55.34

in! t Cear 6.4 'o ntry * &.66 Kehicle * 63.60 Amo nt 25.20< i" co ntry;'LA>AN'< 8onthAvg;amo ntQ62< datalines< 'A/S 614324.62 -/A'OS 642215.35 65403.44 22#55.#) 6#5&&.43

!!. 6110 AS EE. 6110 AS rr. tt.

6110 'ANA(A 'A/S 6110 8@R,'? 'A/S

ss. 6110 'ANA(A -/A'OS 13#43.&4 . 6110 8@R,'? -/A'OS 65510.00 vv. 6110 LA>AN 'A/S xx. < ww. 6110 LA>AN -/A'OS 45)55.34

2)0. $hich SAS statement s bsets the raw data shown below so that only the observations in which Sex 3in the second "ield4 has a val e o" 2 are !rocessed?

a. b. c. d.

i" sex;"< i" sex;2< i" sex;'2'< a or b

2)1. $hich o" the "ollowing is not created d ring the com!ilation !hase? a. the data set descri!tor b. the "irst observation c. the !rogram data vector d. the +N+ and +@//?/+ a tomatic variables 205. ( ring the com!ilation !hase, SAS scans each statement in the (A-A ste!, loo:ing "or syntax errors. $hich o" the "ollowing is not considered a syntax error? a. incorrect val es and "ormats b. invalid o!tions or variable names c. missing or invalid ! nct ation d. missing or miss!elled :eywords 206. Anless otherwise directed, the (A-A ste! exec tes a. once "or each com!ilation !hase. b. once "or each (A-A ste! statement. c. once "or each record in the in! t "ile. d. once "or each variable in the in! t "ile. 202. At the beginning o" the exec tion !hase, the val e o" +N+ is 6, the val e o" +@//?/+ is 5, and the val es o" the remaining variables are set to a. 5 b. 6 c. nde"ined d. missing 203. S !!ose yo r n a !rogram that ca ses three (A-A ste! errors. $hat is the val e o" the a tomatic variable +@//?/+ when the observation that contains the third error is !rocessed? a. 5 b. 6 c. 2 d. 3

204. $hich o" the "ollowing actions occ rs at the end o" the (A-A ste!? a. -he a tomatic variables +N+ and +@//?/+ are incremented by one. b. -he (A-A ste! sto!s exec tion. c. -he descri!tor !ortion o" the data set is written. d. -he val es o" variables created in !rogramming statements are re.set to missing in the !rogram data vector. 20#. Boo: care" lly at the (A-A ste! shown below. %ased on the ,N>A- statement, in what order will the variables be stored in the new data set? data !erm. !date< in"ile invent< in! t ,(n m * 6#.61 ,tem * 6.63 ,nstoc: 26.22 %ac:?rd 24.2#< -otal;instoc:Pbac:ord< r n< a. b. c. d. 20&. ," SAS a. b. c. d. ,(n m ,tem ,nStoc: %ac:?rd -otal ,tem ,(n m ,nStoc: %ac:?rd -otal -otal ,(n m ,tem ,nStoc: %ac:?rd -otal ,tem ,(n m ,nStoc: %ac:?rd cannot inter!ret syntax errors, then data set variables will contain missing val es. the (A-A ste! does not com!ile. the (A-A ste! still com!iles, b t it does not exec te. the (A-A ste! still com!iles and exec tes.

20). $hat is wrong with this !rogram? data !erm. !date< in"ile invent in! t ,tem * 6.63 ,(n m * 6#.61 ,nstoc: 26.22 %ac:?rd 24.2#< total;instoc:Pbac:ord< r n< a. b. c. d. missing semicolon on second line missing semicolon on third line incorrect order o" variables incorrect variable ty!e

200. Boo: care" lly at this section o" a SAS session log. %ased on the note, what was the most li:ely !roblem with the (A-A ste!? N?-@D ,nvalid data "or ,(n m in line ) 6#.61. /AB@D ....P....6....P....2....P....3....P....4 ) %ird 2eeder B7500 3 25

,tem;%ird 2eeder ,(n m;. ,nStoc:;3 %ac:?rd;25 -otal;23 +@//?/+;6 +N+;6

a. b. c. d.

A :eyword was miss!elled in the (A-A ste!. A semicolon was missing "rom the ,N2,B@ statement. A variable was miss!elled in the ,N>A- statement. A dollar sign was missing in the ,N>A- statement.

201. ," yo don't s!eci"y the B,%/A/C; o!tion, yo r "ormats are stored in $or:.2ormats, and they exist 6. only "or the c rrent !roced re. 2. only "or the c rrent (A-A ste!. 3. only "or the c rrent SAS session. 4. !ermanently. 215. $hich o" the "ollowing statements will store yo r "ormats in a !ermanent catalog? 6. libname library 'cDHsasH"ormatsHlib'<!roc "ormat lib;library ...< 2. libname library 'cDHsasH"ormatsHlib'<"ormat lib;library ...< 3. library;'cDHsasH"ormatsHlib'<!roc "ormat library ...< 4. library;'cDHsasH"ormatsHlib'<!roc library ...< 216. $hen creating a "ormat with the KABA@ statement, the new "ormat's name cannot end with a n mber cannot end with a !eriod cannot be the name o" a SAS "ormat, and 6. cannot be the name o" a data set variable. 2. m st be at least two characters long. 3. m st be at least eight characters long. 4. m st begin with a dollar sign 3*4 i" sed with a character variable. 212. $hich o" the "ollowing 2?/8A- !roced res is written correctly? 6. !roc "ormat lib;library val e color"mt< 6;'/ed' 2;'7reen' 3;'%l e' r n< 2. !roc "ormat lib;library< val e color"mt 6;'/ed' 2;'7reen' 3;'%l e'< r n< 3. !roc "ormat lib;library< val e color"mt< 6;'/ed' 2;'7reen' 3;'%l e' r n< 4. !roc "ormat lib;library< val e color"mt 6;'/ed'< 2;'7reen'< 3;'%l e'< r n<

213. $hich o" these is "alse? /anges in the KABA@ statement can s!eci"y 6. a single val e, s ch as 24 or 'S'. 2. a range o" n meric val es, s ch as 5N6#55. 3. a range o" character val es, s ch as 'A'N'8'. 4. a list o" n meric and character val es se!arated by commas, s ch as 15,'%',605,'(',2)5. 214. How many characters can be sed in a label? 6. 45 2. 1& 3. 255 4. 2#& 21#. $hich :eyword can be sed to label missing val es as well as any val es that are not s!eci"ied in a range? 6. B?$ 2. 8,SS 3. 8,SS,N7 4. ?-H@/ 21&. Co can !lace the 2?/8A- statement in either a (A-A ste! or a >/?' ste!. $hat ha!!ens when yo !lace the 2?/8A- statement in a (A-A ste!? 6. Co tem!orarily associate the "ormats with variables. 2. Co !ermanently associate the "ormats with variables. 3. Co re!lace the original data with the "ormat labels. 4. Co ma:e the "ormats available to other data sets. 21). -he "ormat L?%28- was created in a 2?/8A- !roced re. $hich 2?/8A- statement will a!!ly it to the variable Lob-itle in the !rogram o t! t? 1. "ormat Gobtitle Gob"mt< 2. "ormat Gobtitle Gob"mt.< 3. "ormat Gobtitle;Gob"mt< 4. "ormat Gobtitle;'Gob"mt'< 210. $hich :eyword, when added to the >/?' 2?/8A- statement, will dis!lay all the "ormats in yo r catalog? 6. 'A-AB?7 2. B,S-283. 28-'A4. 28-B,%

211. ," Style has "o r niE e val es and yo s bmit the "ollowing !rogram, which o t! t do yo get? 3Ass me that all the other variables are n meric.4 !roc re!ort data;sas ser.ho ses nowd< col mn style sE"eet bedrooms !rice< de"ine style Q gro !< r n< a. Style '?N(? /AN'H S>B,-$?S-?/C b. Style '?N(? SE2eet 6455 6315 265# 60&5 /AN'H 62#5 6#55 6#3# )25 S>B,6615 6&6# 635# -$?S-?/C 6065 6545 6245 %edrooms 2 3 4 2 2 3 3 6 6 4 3 4 2 2 >rice *05,5#5 *)1,3#5 *62),6#5 *665,)55 *&4,555 *0&,&#5 *01,655 *34,##5 *&#,0#5 *14,4#5 *)3,&#5 *65),2#5 *##,0#5 *&1,2#5 SE2eet &)## #55# 4665 #03# %edrooms 66 1 0 62 >rice *31),2#5 *2)4,355 *233,1#5 *33#,355

Style

SE2eet 6)4#

%edrooms 4

>rice *652,1#5

c. Style 6# d. Style /AN'H S>B,'?N(? -$?S-?/C /AN'H S>B,S>B,'?N(? -$?S-?/C '?N(? /AN'H -$?S-?/C /AN'H -$?S-?/C '?N(? e. 355. $hen yo de"ine an order variable, a. the detail rows are ordered according to their "ormatted val es. b. yo can't create s mmary re!orts. c. >/?' /@>?/- dis!lays only the "irst occ rrence o" each order variable val e in a set o" rows that have the same val e "or all order variables. d. all o" the above SE2eet 62#5 6615 6455 6065 6#55 6&6# 635# 6315 6545 265# 6#3# 6245 )25 6)4# 60&5 %edrooms 2 6 2 4 3 4 3 3 2 4 3 2 6 4 2 >rice *&4,555 *&#,0#5 *05,5#5 *65),2#5 *0&,&#5 *14,4#5 *)3,&#5 *)1,3#5 *##,0#5 *62),6#5 *01,655 *&1,2#5 *34,##5 *652,1#5 *665,)55 SE2eet 26)5# %edrooms 45 >rice *6,245,055

356. $hich attrib tes or o!tions are re"lected in this >/?' /@>?/- o t! t? style SE2eet >rice

....................................

/AN'H -$?S-?/C S>B,-$?S-?/C /AN'H S>B,'?N(? '?N(? /AN'H /AN'H S>B,-$?S-?/C -$?S-?/C '?N(?

)25 6545 6615

*34,##5 *##,0#5

*&#,0#5 *&1,2#5 *&4,555 *)3,&#5 *)1,3#5 *05,5#5 *0&,&#5 *01,655 *14,4#5 *652,1#5 *65),2#5 *665,)55

6245 62#5 635# 6315 6455 6#55 6#3# 6&6#

6)4# 6065 60&5

'?N(? 265# *62),6#5 a. SO,>B,N@ and 2?/8A-; b. '@N-@/, H@A(B,N@, H@A(SO,>, and either $,(-H;, S>A',N7;, or 2?/8A-; c. S>A',N7; only d. '@N-@/, 2?/8A-;, and H@A(B,N@

352. -o create a s mmary re!ort that shows the average n mber o" bedrooms and the maxim m n mber o" baths "or each style o" ho se, which (@2,N@ statements do yo se in yo r >/?' /@>?/- ste!? a. b. c. d. e. ". g. h. i. G. :. l. de"ine style Q center 'Style o"QHo se'< de"ine bedrooms Q mean 'AverageQ%edrooms'< de"ine baths Q max '8axim mQ%aths'< de"ine style Q gro !< de"ine bedrooms Q mean 'AverageQ%edrooms'< de"ine baths Q max '8axim mQ%aths'< de"ine style Q order< de"ine bedrooms Q mean 'AverageQ%edrooms'< de"ine baths Q max '8axim mQ%aths'< de"ine style Q gro !< de"ine bedrooms Q 'AverageQ%edrooms'< de"ine baths Q '8axim mQ%aths'

353. $hich !rogram does not contain an error? a. b. c. d. e. ". g. h. i. G. :. l. m. n. o. !. E. r. s. t. . v. w. r n< !roc re!ort data;sas ser.ho ses nowd< col mn style bedrooms baths %ed%ath/atio< de"ine style Q order< de"ine bedbathratio Q com! ted "ormat;4.2< com! te bedbathratio< bedbathratio;baths.s mQbedrooms.s m< endcom!< r n< !roc re!ort data;sas ser.ho ses nowd< col mn style bedrooms baths %ed%ath/atio< de"ine style Q order< de"ine bedbathratio Q order "ormat;4.2< com! te bedbathratio< bedbathratio;baths.s mQbedrooms.s m< endcom!< !roc re!ort data;sas ser.ho ses nowd< col mn style bedrooms baths< de"ine style Q order< de"ine bedbathratio Q com! ted "ormat;4.2< com! te bedbathratio< bedbathratio;baths.s mQbedrooms.s m< endcom!<

x. y. 9. aa. bb. cc. dd. ee. "".

r n< !roc re!ort data;sas ser.ho ses nowd< col mn style bedrooms baths %ed%ath/atio< de"ine style Q order< de"ine bedbathratio Q com! ted "ormat;4.2< com! te bedbathratio< bedbathratio;bathsQbedrooms< endcom!< r n<

354. $hat o t! t does this >/?' /@>?/- ste! !rod ce? !roc re!ort data;sas ser.ho ses nowd< col mn style sE"eet bedrooms !rice< r n< a. b. c. a list re!ort ordered by val es o" the "irst variable in the '?BA8N statement a s mmary re!ort ordered by val es o" the "irst variable in the '?BA8N statement a list re!ort that dis!lays a row "or each observation in the in! t data set and which calc lates the SA8 statistic "or n meric variables d. a list re!ort that calc lates the N 3"reE ency4 statistic "or character variables

35#. $hich o" the "ollowing !rograms !rod ces this o t! t? Style '?N(? 4 a. b. c. d. e. ". g. h. i. G. :. l. m. n. o. de"ine !rice Q mean 'Average >rice'< r n< !roc re!ort data;sas ser.ho ses nowd< col mn style !rice< de"ine style Q gro !< de"ine !rice Q mean 'Average >rice'< r n< !roc re!ort data;sas ser.ho ses nowd< col mn style !rice< de"ine style Q across< de"ine !rice Q mean 'Average >rice'< /AN'H 4 S>B,3 -$?S-?/C 4 Average >rice *02,)25

!roc re!ort data;sas ser.ho ses nowd< col mn style condo range s!lit twostory !rice<

!. E. r. s. t. . v.

r n< !roc re!ort data;sas ser.ho ses nowd< col mn style !rice< de"ine style Q across ''?N(?' '/AN'H' 'S>B,-' '-$?S-?/C'< de"ine !rice Q mean 'Average >rice'< r n<

35&. ," yo s bmit this !rogram, where does yo r >/?' /@>?/- o t! t a!!ear? !roc re!ort data;sas ser.ho ses nowd< col mn style sE"eet bedrooms !rice< de"ine style Q gro !< r n< a. b. c. d. in the >/?' /@>?/- window as H-8B andQor SAS listing o t! t both o" the above neither o" the above

35). How can yo create o t! t with headings that brea: as shown below? style o" Ho se '?N(? /AN'H S>B,Average %edrooms 2.)# 2.2# 2.&&&&&& 8axim m %aths 2.# 3 3

-$?S-?/C 3 3 a. Co m st s!eci"y the S>B,-; o!tion in the >/?' /@>?/- statement and se the s!lit character in col mn headings in (@2,N@ statements. b. Co m st se the de"a lt s!lit character in col mn headings in (@2,N@ statements. c. Co m st s!eci"y either the $,(-H; or the S>A',N7; attrib te in (@2,N@ statements. d. -hese headings s!lit this way by de"a lt. 350. S !!ose yo want to create a re!ort sing both character and n meric variables. ," yo don't se any (@2,N@ statements in yo r >/?' /@>?/- ste!, a. yo r >/?' /@>?/- ste! will not exec te s ccess" lly. b. yo can !rod ce only list re!orts. c. yo can order rows by s!eci"ying o!tions in the >/?' /@>?/- statement. d. yo can !rod ce only s mmary re!orts. 351. -he de"a lt statistics !rod ced by the 8@ANS !roced re are n.co nt, mean, minim m, maxim m, and a. median. b. range. c. standard deviation. d. standard error o" the mean.

365. $hich statement will limit a >/?' 8@ANS analysis to the variables %oarded, -rans"er, and (e!lane? a. by boarded trans"er de!lane< b. class boarded trans"er de!lane< c. o t! t boarded trans"er de!lane< d. var boarded trans"er de!lane< 366. -he data set S rvey.Health incl des the "ollowing variables. $hich is a !oor candidate "or >/?' 8@ANS analysis? a. ,(n m b. Age c. Height d. $eight 362. $hich o" the "ollowing statements is tr e regarding %C.gro ! !rocessing? a. %C variables m st be either indexed or sorted. b. S mmary statistics are com! ted "or %C variables. c. %C.gro ! !rocessing is !re"erred when yo are categori9ing data that contains "ew variables. d. %C.gro ! !rocessing overwrites yo r data set with the newly gro !ed observations. 363. $hich gro ! !rocessing statement !rod ced the >/?' 8@ANS o t! t shown below? S rvive (,@( Sex 6 N ?bs 4 Kariable Arterial Heart 'ardiac Arinary 2 & Arterial Heart 'ardiac Arinary SA/K 6 # Arterial Heart 'ardiac Arinary 2 # Arterial Heart 'ardiac Arinary a. class sex s rvive< N 4 4 4 4 & & & & # # # # # # # # 8ean 12.# 666.5 6)&.0 10.5 14.2 653.) 360.3 655.3 )).2 651.5 210.5 655.0 )0.0 655.5 335.2 666.2 Std (ev 65.# #3.4 )#.2 60&.6 2).3 6&.) 652.& 6##.) 62.2 32.5 631.0 &5.2 &.0 63.4 0).5 6#2.4 8inim m 03.5 #4.5 1#.5 5.5 )2.5 06.5 6#&.5 5.5 &6.5 )).5 &&.5 44.5 )2.5 04.5 2#&.5 62.5 8axim m 653.5 603.5 2&5.5 3)).5 64#.5 635.5 424.5 45#.5 00.5 641.5 465.5 255.5 0).5 666.5 4)6.5 3)).5

b. c. d.

class s rvive sex< by sex s rvive< by s rvive sex<

364. $hich !rogram can be sed to create the "ollowing o t! t? Sex 2 N ?bs 66 Kariabl e Age Height $eight 8 1 Age Height $eight a. b. c. d. e. ". g. h. i. G. :. r n< l. m. n. o. !. E. r. !roc means data;clinic.diabetes no!rint< var age height weight< class sex< o t! t o t;wor:.s m+gender mean;AvgAge AvgHeight Avg$eight< r n< %oth a and b. r n< !roc s mmary data;clinic.diabetes !rint< var age height weight< class sex< o t! t o t;wor:.s m+gender mean;AvgAge AvgHeight Avg$eight< N 66 66 66 1 1 1 8ean 40.1515151 &3.1515151 6#5.4#4#4# # 44.5555555 )5.&&&&&&) 254.222222 2 Std (ev 63.35)##5 0 2.6616)&# 60.44&402 0 62.301#66 ) 2.&4#)#63 35.20134# 4 8inim m 6&.5555555 &6.5555555 652.555555 5 6#.5555555 &&.5555555 645.555555 5 8axim m &3.5555555 &0.5555555 6&0.555555 5 #4.5555555 )#.5555555 245.555555 5

!roc means data;clinic.diabetes< var age height weight< class sex< o t! t o t;wor:.s m+gender mean;AvgAge AvgHeight Avg$eight<

36#. %y de"a lt, >/?' 2/@S creates a table o" "reE encies and !ercentages "or which data set variables? a. character variables b. n meric variables c. both character and n meric variables d. noneD variables m st always be s!eci"ied 36&. 2reE ency distrib tions wor: best with variables that contain a. contin o s val es. b. n meric val es. c. categorical val es. d. niE e val es. 36). $hich >/?' 2/@S ste! !rod ced this two.way table?

a. b. c. d. e. ". g. h. i. G. :. l. m.

!roc "reE data;clinic.diabetes< tables height weight< "ormat height ht"mt. weight wt"mt.<r n< !roc "reE data;clinic.diabetes< tables weight height< "ormat weight wt"mt. height ht"mt.< r n< !roc "reE data;clinic.diabetes< tables height=weight< "ormat height ht"mt. weight wt"mt.< r n< !roc "reE data;clinic.diabetes<

n. o. !.

tables weight=height< "ormat weight wt"mt. height ht"mt.< r n<

360. $hich >/?' 2/@S ste! !rod ced this table?

a. b. c. d. e. ". g. h. i. G. :. l. m. n. o. !.

!roc "reE data;clinic.diabetes< tables sex weight Q list< "ormat weight wt"mt.< r n< !roc "reE data;clinic.diabetes< tables sex=weight Q nocol< "ormat weight wt"mt.< r n< !roc "reE data;clinic.diabetes< tables sex weight Q norow nocol< "ormat weight wt"mt.< r n< !roc "reE data;clinic.diabetes< tables sex=weight Q no"reE norow nocol< "ormat weight wt"mt.< r n<

361. Asing ?(S statements, how many ty!es o" o t! t can yo generate conc rrently? a. 6 3only listing o t! t4 b. 2 c. 3 d. as many as yo want 325. ," ?(S is set to its de"a lt settings, what ty!es o" o t! t are created by the code below? ods html "ile;'cDHmyhtml.htm'< ods !d" "ile;'cDHmy!d".!d"'< a. H-8B and >(2 b. >(2 only c. H-8B, >(2, and listing d. No o t! t is created beca se ?(S is closed by de"a lt.

326. $hat is the ! r!ose o" closing the Bisting destination in the code shown below? ods listing close< ods html ... < a. ,t conserves system reso rces. b. ,t sim!li"ies yo r !rogram. c. ,t ma:es yo r !rogram com!atible with other hardware !lat"orms. d. ,t ma:es yo r !rogram com!atible with !revio s versions o" SAS so"tware. 322. $hen the code shown below is r n, what will the "ile (DH? t! tHbody.html contain? ods html body;'dDHo t! tHbody.html'< !roc !rint data;wor:.al!ha< r n< !roc !rint data;wor:.beta< r n< ods html close< a. -he >/?' >/,N- o t! t "or $or:.Al!ha. b. -he >/?' >/,N- o t! t "or $or:.%eta. c. -he >/?' >/,N- o t! t "or both $or:.Al!ha and $or:.%eta. d. Nothing. No o t! t will be written to (DH? t! tHbody.html. 323. $hen the code shown below is r n, what "ile will be loaded by the lin:s in (DH? t! tHcontents.html? ods html body;'dDHo t! tHbody.html' contents;'dDHo t! tHcontents.html' a. b. c. d. "rame;'dDHo t! tH"rame.html'< (DH? t! tHbody.html (DH? t! tHcontents.html (DH? t! tH"rame.html -here are no lin:s "rom the "ile (DH? t! tHcontents.html.

324. -he table o" contents created by the '?N-@N-S; o!tion contains a n mbered heading "or a. each !roced re. b. each !roced re that creates o t! t. c. each !roced re and (A-A ste!. d. each H-8B "ile created by yo r !rogram.

32#. $hen the code shown below is r n, what will the "ile (DH? t! tH"rame.html dis!lay? ods html body;'dDHo t! tHbody.html' contents;'dDHo t! tHcontents.html' a. b. c. d. "rame;'dDHo t! tH"rame.html'< -he "ile (DH? t! tHcontents.html. -he "ile (DH? t! tH"rame.html. -he "iles (DH? t! tHcontents.html and (DH? t! tHbody.html. ,t dis!lays no other "iles.

32&. $hat is the ! r!ose o" the A/B; s bo!tions shown below? ods html body;'dDHo t! tHbody.html' 3 rl;'body.html'4 contents;'dDHo t! tHcontents.html' 3 rl;'contents.html'4 a. b. c. d. "rame;'dDHo t! tH"rame.html'< -o create absol te lin: addresses "or loading the "iles "rom a server. -o create relative lin: addresses "or loading the "iles "rom a server. -o allow H-8B "iles to be loaded "rom a local drive. -o send H-8B o t! t to two locations.

32). $hich ?(S H-8B o!tion was sed in creating the "ollowing table?

a. b. c. d.

"ormat;brown "ormat;'brown' style;brown style;'brown'

320. $hat is the ! r!ose o" the >A-H; o!tion? ods html !ath;'dDHo t! t' 3 rl;none4 body;'body.html' contents;'contents.html' a. b. c. d. "rame;'"rame.html'< ,t creates absol te lin: addresses "or loading H-8B "iles "rom a server. ,t creates relative lin: addresses "or loading H-8B "iles "rom a server. ,t allows H-8B "iles to be loaded "rom a local drive. ,t s!eci"ies the location o" H-8B "ile o t! t.

321. $hich !rogram creates the o t! t shown below?

Stoc:N m 365 366 362 363 a. b. c. d. e. ". g. h. i. G. :. l. m. n. o. !. E. r. s. t. . v.

2inish oa: ma!le brass glass

Style !edestal !edestal "loor table

,tem table table lam! lam!

-otal>rice 321.11 &11.10 ))1.1) 031.1&

data test2< in"ile " rnt re< in! t Stoc:N m * 6.3 2inish * #.1 Style * 66.60 ,tem * 25.24 >rice 2&.36< i" "inish;'oa:' then delete< retain -ot>rice 655< total!riceP!rice< dro! !rice< r n< !roc !rint data;test2 noobs< r n< data test2< in"ile " rnt re< in! t Stoc:N m * 6.3 2inish * #.1 Style * 66.60 ,tem * 25.24 >rice 2&.36< i" "inish;'oa:' and !riceM255 then delete< -otal>riceP!rice< r n< !roc !rint data;test2 noobs< r n< data test23dro!;!rice4< in"ile " rnt re<

w. x. y. 9.

in! t Stoc:N m * 6.3 2inish * #.1 Style * 66.60 ,tem * 25.24 >rice 2&.36< i" "inish;'oa:' and !riceM255 then delete< -otal>riceP!rice<

aa. r n< bb. !roc !rint data;test2 noobs< cc. r n< dd. data test2< ee. "". gg. hh. ii. GG. ll. in"ile " rnt re< in! t Stoc:N m * 6.3 2inish * #.1 Style * 66.60 ,tem * 25.24 >rice 2&.36< i" "inish;oa: and !riceM255 then delete !rice< -otal>riceP!rice< r n< r n<

::. !roc !rint data;test2 noobs<

335. How is the variable Amo nt labeled and "ormatted in the >/?' >/,N- o t! t? data credit< in"ile creddata< in! t Acco nt * 6.# Name * ).2# -y!e * 2) -ransact * 21.3# Amo nt 3).#5< label amo nt;'Amo nt o" Boan'< "ormat amo nt dollar62.2<

r n< !roc !rint data;credit label< label amo nt;'-otal Amo nt Boaned'< "ormat amo nt comma65.< r n< a. b. c. d. label Amo nt o" Boan, "ormat (?BBA/62.2 label -otal Amo nt Boaned, "ormat '?88A65. label Amo nt, de"a lt "ormat -he >/?' >/,N- ste! does not exec te beca se two labels and two "ormats are assigned to the same variable.

336. 'onsider the ,2.-H@N statement shown below. $hen the statement is exec ted, which ex!ression is eval ated "irst? i" "inlexamF;1# and 3research;'A' or 3!roGect;'A' and !resent;'A'44 then 7rade;'AP'< a. "inlexamF;1# b. research;'A' c. !roGect;'A' and !resent;'A' d. research;'A' or 3!roGect;'A' and !resent;'A'4 332. 'onsider the small raw data "ile and !rogram shown below. $hat is the val e o" 'o nt a"ter the "o rth record is read?

a. b. c. d.

missing 5 35 )5

333. Now consider the revised !rogram below. $hat is the val e o" 'o nt a"ter the third observation is read?

a. b. c. d.

missing 5 655 635

334. 2or the observation shown below, what is the res lt o" the ,2.-H@N statement? Stat s o: -y!e 3 'o nt 62 Action @ 'ontrol 7o

i" stat s;'?O' and ty!e;3 then 'o ntP6< i" stat s;'S' or action;'@' then 'ontrol;'Sto!'< a. 'o nt ; 62 'ontrol ; 7o b. 'o nt ; 63 'ontrol ; Sto! c. 'o nt ; 62 'ontrol ; Sto! d. 'o nt ; 63 'ontrol ; 7o 33#. $hich o" the "ollowing can determine the length o" a new variable? a. the length o" the variable's "irst val e b. the assignment statement c. the B@N7-H statement d. all o" the above 33&. $hich set o" statements is the most e""icient eE ivalent to the code shown below? i" code;'6' then -y!e;'2ixed'< i" code;'2' then -y!e;'Kariable'< i" codeT;'6' and codeT;'2' then -y!e;'An:nown'< a. b. c. d. e. ". g. h. i. G. :. l. i" code;'6' then -y!e;'2ixed'< else i" code;'2' then -y!e;'Kariable'< else -y!e;'An:nown'< i" code;'6' then -y!e;'2ixed'< i" code;'2' then -y!e;'Kariable'< else -y!e;'An:nown'< i" code;'6' then ty!e;'2ixed'< else code;'2' and ty!e;'Kariable'< else ty!e;'An:nown'< i" code;'6' and ty!e;'2ixed'< then code;'2' and ty!e;'Kariable'< else ty!e;'An:nown'<

33). $hat is the length o" the variable -y!e, as created in the (A-A ste! below? data "inance.newloan< set "inance.records< -otBoanP!ayment< i" code;'6' then -y!e;'2ixed'< else -y!e;'Kariable'< length ty!e * 65< r n< a. b. c. d. # 0 65 ,t de!ends on the "irst val e o" -y!e.

330. $hich !rogram contains an error? a. b. c. d. e. ". g. h. i. G. :. l. m. n. o. !. E. r. s. t. . v. w. x. data clinic.stress3dro!;timemin timesec4< in"ile tests< in! t ,( * 6.4 Name * &.2# /estH/ 2).21 8axH/ 36.33 /ecH/ 3#.3) -ime8in 31.45 -imeSec 42.43 -olerance * 4#< -otal-ime;3timemin=&54Ptimesec< S mSecPtotaltime< r n< !roc !rint data;clinic.stress< label totaltime;'-otal ( ration o" -est'< "ormat timemin #.2< dro! s msec< r n< !roc !rint data;clinic.stress3:ee!;totaltime timemin4< label totaltime;'-otal ( ration o" -est'< "ormat timemin #.2< r n< data clinic.stress< in"ile tests< in! t ,( * 6.4 Name * &.2# /estH/ 2).21 8axH/ 36.33 /ecH/ 3#.3) -ime8in 31.45 -imeSec 42.43 -olerance * 4#< -otal-ime;3timemin=&54Ptimesec< :ee! id totaltime tolerance<

y.

r n<

331. ," yo s bmit the "ollowing !rogram, which variables a!!ear in the new data set? data wor:.cardiac3dro!;age gro !4< set clinic."itness3:ee!;age weight gro !4< i" gro !;2 and ageF45< r n< a. b. c. d. none $eight Age, 7ro ! Age, $eight, 7ro !

345. $hich o" the "ollowing !rograms correctly reads the data set ?rders and creates the data set 2ast?rdr? a. b. c. d. e. ". g. h. i. G. :. l. m. n. o. !. E. data catalog."astordr3dro!;ordrtime4< set G ly.orders3:ee!;!rod ct nits !rice4< i" ordrtimeM4< -otal; nits=!rice< r n< data catalog.orders3dro!;ordrtime4< set G ly."astordr3:ee!;!rod ct nits !rice4< i" ordrtimeM4< -otal; nits=!rice< r n< data catalog."astordr3dro!;ordrtime4< set G ly.orders3:ee!;!rod ct nits !rice ordrtime4< i" ordrtimeM4< -otal; nits=!rice< r n< none o" the above

346. $hich o" the "ollowing statements is "alse abo t %C.gro ! !rocessing? $hen yo se the %C statement with the S@- statement, a. the data sets that are listed in the S@- statement m st be indexed or sorted by the val es o" the %C variable3s4. b. the (A-A ste! a tomatically creates two variables, 2,/S-. and BAS-., "or each variable in the %C statement. c. 2,/S-. and BAS-. identi"y the "irst and last observation in each %C gro !, in that order. d. 2,/S-. and BAS-. are stored in the data set.

342. -here are #55 observations in the data set 'om!any.ASA. $hat is the res lt o" s bmitting the "ollowing !rogram? data wor:.getobs#3dro!;obsn m4< obsn m;#< set com!any. sa3:ee!;manager !ayroll4 !oint;obsn m< sto!< r n< a. b. c. d. an error an em!ty data set a contin o s loo! a data set that contains one observation

343. -here is no end.o"."ile condition when yo se direct access to read data, so how can yo r !rogram !revent a contin o s loo!? a. (o not se a >?,N-; variable. b. 'hec: "or an invalid val e o" the >?,N-; variable. c. (o not se an @N(; variable. d. ,ncl de an ?A->A- statement. 344. Ass ming that the data set 'om!any.ASA has "ive or more observations, what is the res lt o" s bmitting the "ollowing !rogram? data wor:.getobs#3dro!;obsn m4< obsn m;#< set com!any. sa3:ee!;manager !ayroll4 !oint;obsn m< o t! t< sto!< r n< a. b. c. d. an error an em!ty data set a contin o s loo! a data set that contains one observation

34#. $hich o" the "ollowing statements is tr e regarding direct access o" data sets? a. Co cannot s!eci"y @N(; with >?,N-;. b. Co cannot s!eci"y ?A->A- with >?,N-;. c. Co cannot s!eci"y S-?> with @N(;. d. Co cannot s!eci"y 2,/S-. with BAS-.

34&. $hat is the res lt o" s bmitting the "ollowing !rogram? data wor:.addtoend< set clinic.stress2 end;last< i" last< r n< a. b. c. d. an error an em!ty data set a contin o s loo! a data set that contains one observation

34). At the start o" (A-A ste! !rocessing, d ring the com!ilation !hase, variables are created in the !rogram data vector 3>(K4, and observations are set to a. blan: b. missing c. 5 d. there are no observations. 340. -he (A-A ste! exec tes a. contin o sly i" yo se the >?,N-; o!tion and the S-?> statement. b. once "or each variable in the o t! t data set. c. once "or each observation in the in! t data set. d. ntil it enco nters an ?A->A- statement. 341. $hich !rogram will combine %rothers.?ne and %rothers.-wo to !rod ce %rothers.-hree?

a. b. c. d. e. ". g. h. i. G. :. l. m. n. o.

data brothers.three< set brothers.one< set brothers.two< r n< data brothers.three< set brothers.one brothers.two< r n< data brothers.three< set brothers.one brothers.two< by varx< r n< data brothers.three< merge brothers.one brothers.two< by varx< r n<

3#5. $hich !rogram will combine Actors.>ro!s6 and Actors.>ro!s2 to !rod ce Actors.>ro!s3?

a. b. c. d. e. ". g. h. i. G. :. l. m. n. o.

data actors.!ro!s3< set actors.!ro!s6< set actors.!ro!s2< r n< data actors.!ro!s3< set actors.!ro!s6 actors.!ro!s2< r n< data actors.!ro!s3< set actors.!ro!s6 actors.!ro!s2< by actor< r n< data actors.!ro!s3< merge actors.!ro!s6 actors.!ro!s2< by actor< r n<

3#6. ," yo s bmit the "ollowing !rogram, which new data set is created?

data wor:.Gobsatis< set wor:.dataone wor:.datatwo< r n< a. 'areer )2 S !ervis 2& 2inance 1 Kariety . 2eedbac: . A tonomy .

'areer &3 1& 1& 04 . . . . . b. 'areer )2 &3 1& 1& 04 c. 'areer )2 &3 1&

S !ervis )& 36 10 14 . . . . .

2inance ) ) & & . . . . .

Kariety . . . . 65 0# 03 02 3&

2eedbac: . . . . 66 22 &3 )# ))

A tonomy . . . . )5 13 )3 1) 1)

S !ervis 2& )& 36 10 14

2inance 1 ) ) & &

Kariety 65 0# 03 02 3&

2eedbac: 66 22 &3 )# ))

A tonomy )5 13 )3 1) 1)

S !ervis 2& )& 36

2inance 1 ) )

'areer

S !ervis

2inance

1& 04 65 0# 03 02 3& d. none o" the above

10 14 66 22 &3 )# ))

& & )5 13 )3 1) 1)

3#2. ," yo concatenate the data sets below in the order shown, what is the val e o" Sale in observation 2 o" the new data set?

a. b. c. d.

missing *35,555 *45,555 yo cannot concatenate these data sets

3#3. $hat ha!!ens i" yo merge the "ollowing data sets by variable SSN?

a. b. c.

-he val es o" Age in the 6st data set overwrite the val es o" Age in the 2nd data set. -he val es o" Age in the 2nd data set overwrite the val es o" Age in the 6st data set. -he (A-A ste! "ails beca se the two data sets contain same.named variables that have di""erent val es. d. -he val es o" Age in the 2nd data set are set to missing. 3#4. S !!ose yo merge data sets Health.Set6 and Health.Set2 belowD

$hich o t! t does the "ollowing !rogram create? data wor:.merged< merge health.set63in;in64 health.set23in;in24< by id< i" in6 and in2< r n<

!roc !rint data;wor:.merged< r n< a. ?bs 6 2 3 4 # & ) 0 1 65 66 b. ?bs 6 2 3 4 # ,( 6621 630) 2354 #430 &400 Sex 2 2 2 2 2 Age 40 #5 #) 6& &3 Height &6 &4 &6 &2 &4 $eight 63) 642 652 6&0 6#4 ,( 6621 62)4 630) 2354 240& 442# 4)#1 #430 &400 1562 162# Sex 2 2 2 2 2 2 2 2 2 2 2 Age 40 #5 #) 6& &3 40 &5 42 #1 31 #& Height &6 . &4 &6 . . . &2 &4 &3 &4 . 6&0 6#4 6#) 6#1 $eight 63) . 642 652 . .

?bs & ) 0 1 65 66 c. ?bs 6 2 3 4 # & ) d.

,( 1562 162# #430 &400 1562 162#

Sex 2 2 2 2 2 2

Age 40 &5 42 #1 31 #&

Height &3 &4 . . . .

$eight 6#) 6#1 . . . .

,( 6621 630) 2354 #430 &400 1562 162#

Sex 2 2 2 2 2 2 2

Age 40 #) 6& 42 #1 31 #&

Height &6 &4 &6 &2 &4 &3 &4

$eight 63) 642 652 6&0 6#4 6#) 6#1

none o" the above

3##. -he data sets @nsemble.S!ring and @nsemble.S mmer both contain a variable named %l e. How do yo !revent the val es o" the variable %l e "rom being overwritten when yo merge the two data sets? a. b. c. d. e. ". g. h. i. G. :. l. m. n. o. !. E. r. s. t. r n< r n< data ensemble.merged< merge ensemble.s!ring3rename;3bl e;navy44 ensemble.s mmer< by "abric< r n< data ensemble.merged< merge ensemble.s!ring3bl e;navy4 ensemble.s mmer< by "abric< r n< data ensemble.merged< merge ensemble.s!ring3o t;bl e4 ensemble.s mmer< by "abric< data ensemble.merged< merge ensemble.s!ring3in;bl e4 ensemble.s mmer< by "abric<

3#&. $hat ha!!ens i" yo s bmit the "ollowing !rogram to merge %lood.(onors6 and %lood.(onors2, shown below? data wor:.merged< merge blood.donors6 blood.donors2< by id< r n<

a.

-he 8erged data set contains some missing val es beca se not all observations have matching observations in the other data set. b. -he 8erged data set contains 0 observations. c. -he (A-A ste! !rod ces errors. d. Kal es "or Anits in %lood.(onors2 overwrite val es "or Anits in %lood.(onors6. 3#). ," yo merge 'om!any.Sta""6 and 'om!any.Sta""2 below by ,(, how many observations does the new data set contain?

a. b. c. d.

4 # & 1

3#0. ," yo merge data sets Sales./e!s, Sales.'lose, and Sales.%on s by ,(, what is the val e o" %on s in the third observation in the new data set?

a. b. c. d.

*4,555 *3,555 missing can't tell "rom the in"ormation given

3#1. $hich " nction calc lates the average o" the variables Kar6, Kar2, Kar3, and Kar4? a. mean3var6,var44 b. mean3var6.var44 c. mean3o" var6,var44 d. mean3o" var6.var44

3&5. $ithin the data set Hrd.-em!, >ay/ate is a character variable and Ho rs is a n meric variable. $hat ha!!ens when the "ollowing !rogram is r n? data wor:.tem!< set hrd.tem!< Salary;!ayrate=ho rs< r n< a. SAS log. b. SAS log. c. SAS log. d. SAS converts the val es o" >ay/ate to n meric val es. No message is written to the converts the val es o" >ay/ate to n meric val es. A message is written to the converts the val es o" Ho rs to character val es. No message is written to the converts the val es o" Ho rs to character val es. A message is written to the log.

3&6. A ty!ical val e "or the character variable -arget is 623,4#&. $hich statement correctly converts the val es o" -arget to n meric val es when creating the variable -argetNo? a. -argetNo;in! t3target,comma&.4< b. -argetNo;in! t3target,comma).4< c. -argetNo;! t3target,comma&.4< d. -argetNo;! t3target,comma).4< 3&2. A ty!ical val e "or the n meric variable SiteN m is 62.3. $hich statement correctly converts the val es o" SiteN m to character val es when creating the variable Bocation? a. Bocation;de!tUU'Q'UUin! t3siten m,3.64< b. Bocation;de!tUU'Q'UUin! t3siten m,4.64< c. Bocation;de!tUU'Q'UU! t3siten m,3.64< d. Bocation;de!tUU'Q'UU! t3siten m,4.64< 3&3. S !!ose the C@A/'A-?22; system o!tion is set to 6125. $hich 8(C " nction creates the date val e "or Lan ary 3, 2525? a. 8(C36,3,254 b. 8(C33,6,254 c. 8(C36,3,25254 d. 8(C33,6,25254 3&4. -he variable Address2 contains val es s ch as >iscataway, NL. How do yo assign the two. letter state abbreviations to a new variable named State? a. State;scan3address2,24< b. State;scan3address2,63,24< c. State;s bstr3address2,24< d. State;s bstr3address2,63,24< 3&#. -he variable ,('ode contains val es s ch as 6232A and 3268%. -he "o rth character identi"ies sex. How do yo assign these character codes to a new variable named Sex? a. Sex;scan3idcode,44< b. Sex;scan3idcode,4,64< c. Sex;s bstr3idcode,44< d. Sex;s bstr3idcode,4,64< 3&&. ( e to growth within the 161 area code, the tele!hone exchange ### is being reassigned to the 125 area code. -he data set 'lients.>iedmont incl des the variable >hone, which contains

change the val es o" >hone? a. data wor:.!iedmont3dro!;areacode exchange4< set clients.!iedmont< Areacode;s bstr3!hone,6,34< @xchange;s bstr3!hone,#,34< i" areacode;'161' and exchange;'###' then scan3!hone,6,34;'125'< r n< b. data wor:.!iedmont3dro!;areacode exchange4< set clients.!iedmont< Areacode;s bstr3!hone,6,34< @xchange;s bstr3!hone,#,34< i" areacode;'161' and exchange;'###' then !hone;scan3'125',6,34< r n< c. data wor:.!iedmont3dro!;areacode exchange4< set clients.!iedmont< Areacode;s bstr3!hone,6,34< @xchange;s bstr3!hone,#,34< i" areacode;'161' and exchange;'###' then s bstr3!hone,6,34;'125'< r n< d. data wor:.!iedmont3dro!;areacode exchange4< set clients.!iedmont< Areacode;s bstr3!hone,6,34< @xchange;s bstr3!hone,#,34< i" areacode;'161' and exchange;'###' then !hone;s bstr3'125',6,34< r n< 3&). S !!ose yo need to create the variable 2 llName by concatenating the val es o" 2irstName, which contains "irst names, and BastName, which contains last names. $hat's the best way to remove extra blan:s between "irst names and last names? a. data wor:.maillist< set retail.maillist< length 2 llName * 45< " llname;trim "irstnameUU' 'UUlastname< r n< b. data wor:.maillist< set retail.maillist< length 2 llName * 45< " llname;trim3"irstname4UU' 'UUlastname< r n< c. data wor:.maillist< set retail.maillist< length 2 llName * 45< " llname;trim3"irstname4UU' 'UUtrim3lastname4<r n< d. data wor:.maillist< set retail.maillist< length 2 llName * 45< " llname;trim3"irstnameUU' 'UUlastname4< r n< 3&0. $ithin the data set 2 rnit r.%oo:case, the variable 2inish contains val es s ch as ashQcherryQtea:Qmatte.blac:. $hich o" the "ollowing creates a s bset o" the data in which the val es o" 2inish contain the string waln t? 8a:e the search "or the string case.insensitive. a. data wor:.boo:case< set " rnit r.boo:case< i" index3"inish,waln t4 ; 5< r n< b. data wor:.boo:case< set " rnit r.boo:case< i" index3"inish,'waln t'4 F 5< r n< c. data wor:.boo:case< set " rnit r.boo:case< i" index3lowcase3"inish4,waln t4 ; 5< r n< d. data wor:.boo:case< set " rnit r.boo:case< i" index3lowcase3"inish4,'waln t'4 F 5<r n< 3&1. $hich statement is "alse regarding the se o" (? loo!s? a. -hey can contain conditional cla ses. b. -hey can generate m lti!le observations. c. -hey can be sed to combine (A-A and >/?' ste!s. d. -hey can be sed to read data.

3)5. ( ring each exec tion o" the "ollowing (? loo!, the val e o" @arned is calc lated and is added to its !revio s val e. How many times does this (? loo! exec te? data "inance.earnings< Amo nt;6555< /ate;.5)#Q62< do month;6 to 62< @arnedP3amo ntPearned4=rate< end< r n< a. b. c. d. 5 6 62 63

3)6. ?n Lan ary 6 o" each year, *#,555 is invested in an acco nt. 'om!lete the (A-A ste! below to determine the val e o" the acco nt a"ter 6# years i" a constant interest rate o" 65V is ex!ected. data wor:.invest< ... 'a!italP#555< ca!italP3ca!ital=.654< end< r n< a. b. c. d. do co do co do co do co nt;6 to 6#< nt;6 to 6# by 65V< nt;6 to ca!ital< nt;ca!ital to 3ca!ital=.654<

3)2. ,n the data set $or:.,nvest, what wo ld be the stored val e "or Cear? data wor:.invest< do year;6115 to 2554< 'a!italP#555< ca!italP3ca!ital=.654< end< r n< a. b. c. d. missing 6115 2554 255#

3)3. $hich o" the "ollowing statements is "alse regarding the !rogram shown below? data wor:.invest< do year;6115 to 2554< 'a!italP#555< ca!italP3ca!ital=.654< o t! t< end< r n< a. b. c. d. -he ?A->A- statement writes c rrent val es to the data set immediately. -he stored val e "or Cear is 255#. -he ?A->A- statement overrides the a tomatic o t! t at the end o" the (A-A ste!. -he (? loo! !er"orms 6# iterations.

3)4. How many observations will the data set $or:.@arn contain? data wor:.earn< Kal e;2555< do year;6 to 25< ,nterest;val e=.5)#< val ePinterest< o t! t< end< r n< a. b. c. d. 5 6 61 25

3)#. $hich o" the "ollowing wo ld yo se to com!are the res lt o" investing *4,555 a year "or "ive years in three di""erent ban:s that com!o nd interest monthly? Ass me a "ixed rate "or the "ive.year !eriod. a. (? $H,B@ statement b. nested (? loo!s c. (? AN-,B statement d. a (? gro ! 3)&. $hich statement is "alse regarding (? AN-,B statements? a. -he condition is eval ated at the to! o" the loo!, be"ore the enclosed statements are exec ted. b. -he enclosed statements are always exec ted at least once. c. SAS statements in the (? loo! are exec ted ntil the s!eci"ied condition is tr e. d. -he (? loo! m st have a closing @N( statement. 3)). Select the (? $H,B@ statement that wo ld generate the same res lt as the !rogram below. data wor:.invest< ca!ital;655555< do ntil3'a!ital gt #555554< CearP6< ca!italP3ca!ital=.654< end< r n< a. b. c. d. do while3'a!ital ge #555554< do while3'a!ital;#555554< do while3'a!ital le #555554< do while3'a!italM#555554<

3)0. ,n the "ollowing !rogram, com!lete the statement so that the !rogram sto!s generating observations when (istance reaches 2#5 miles or when 65 gallons o" " el have been sed. data wor:.go2#5< set !erm.cars< do gallons;6 to 65 ... < (istance;gallons=m!g< o t! t< end< r n< a. b. c. d. while3(istanceM2#54 when3(istanceF2#54 over3(istance le 2#54 ntil3(istance;2#54

3)1. $hich statement is "alse regarding an A//AC statement? a. ,t is an exec table statement. b. ,t can be sed to create variables. c. ,t m st contain either all n meric or all character elements. d. ,t m st be sed to de"ine an array be"ore the array name can be re"erenced. 305. $hat belongs within the braces o" this A//AC statement? array contribW?X Etr6.Etr4< a. E arter b. E arter= c. 6.4 d. 4 306. 2or the !rogram below, select an iterative (? statement to !rocess all elements in the contrib array. data wor:.contrib< array contribW4X Etr6.Etr4< ... contribWiX;contribWiX=6.2#< end< r n< a. b. c. d. do i;4< do i;6 to 4< do ntil i;4< do while i le 4<

302. $hat is the val e o" the index variable that re"erences L l in the statements below? array E arterW4X Lan A!r L l ?ct< do i;6 to 4< yeargoal;E arterWiX=6.2< end< a. b. c. d. 6 2 3 4

303. $hich (? statement wo ld not !rocess all the elements in the "actors array shown below? array "actorsW=X age height weight blood!r< a. do i;6 to dim3"actors4< b. do i;6 to dim3=4< c. do i;6,2,3,4< d. do i;6 to 4< 304. $hich statement below is "alse regarding the se o" arrays to create variables? a. -he variables are added to the !rogram data vector d ring the com!ilation o" the (A-A ste!. b. Co do not need to s!eci"y the array elements in the A//AC statement. c. %y de"a lt, all character variables are assigned a length o" eight. d. ?nly character variables can be created. 30#. 2or the "irst observation, what is the val e o" di""WiX at the end o" the second iteration o" the (? loo!? $eight6 612 63) 225 $eight2 255 635 265 $eight3 26# 62# 263

array wtW=X weight6.weight65< array di""W1X< do i;6 to 1< di""WiX;wtWiP6X.wtWiX< end< a. b. c. d. 6# 65 0 .)

30&. 2inish the A//AC statement below to create tem!orary array elements that have initial val es o" 1555, 1355, 1&55, and 1155. array goalW4X ... < a. +tem!orary+ 31555 1355 1&55 11554 b. tem!orary 31555 1355 1&55 11554 c. +tem!orary+ 1555 1355 1&55 1155 d. 3tem!orary4 1555 1355 1&55 1155 30). %ased on the A//AC statement below, select the array re"erence "or the array element E#5. array E esW3,2#X E6.E)#< a. E esWE#5X b. E esW6,#5X c. E esW2,2#X d. E esW3,5X 300. Select the A//AC statement that de"ines the array in the "ollowing !rogram. data rainwear.coat< in! t category high6.high3 Q low6.low3< ... do i;6 to 2< do G;6 to 3< com!areWi,GX;ro nd3com!areWi,GX=6.624< end< end< r n< a. b. c. d. array com!areW6,&X high6.high3 low6.low3< array com!areW2,3X high6.high3 low6.low3< array com!areW3,2X high6.high3 low6.low3< array com!areW3,3X high6.high3 low6.low3<

301. $hich SAS statement correctly ses col mn in! t to read the val es in the raw data "ile below in this orderD Address 34th "ield4, SE are2eet 3second "ield4, Style 3"irst "ield4, %edrooms 3third "ield4?

a. b. c. d. e. ". g. h.

in! t Address 6#.21 SE are2eet 0.66 Style 6.& %edrooms 63< in! t * 6#.21 Address 0.66 SE are2eet * 6.& Style 63 %edrooms< in! t Address * 6#.21 SE are2eet 0.66 Style * 6.& %edrooms 63< in! t Address 6#.21 * SE are2eet 0.66 Style 6.& * %edrooms 63<

315. $hich is not an advantage o" col mn in! t? a. ,t can be sed to read character variables that contain embedded blan:s. b. No !laceholder is reE ired "or missing data. c. Standard as well as nonstandard data val es can be read. d. 2ields do not have to be se!arated by blan:s or other delimiters. 316. $hich is an exam!le o" standard n meric data? a. .34.24# b. *24,234.2# c. 6Q2 d. #5V 312. 2ormatted in! t can be sed to read a. standard "ree."ormat data b. standard data in "ixed "ields c. nonstandard data in "ixed "ields d. both standard and nonstandard data in "ixed "ields 313. $hich in"ormat sho ld yo se to read the val es in col mn 6.#?

a. b. c. d.

w. *w. w.d '?88Aw.d

314. -he '?88Aw.d in"ormat can be sed to read which o" the "ollowing val es? a. 62,05# b. *6)).1# c. 60 V d. all o" the above

31#. $hich ,N>A- statement correctly reads the val es "or 8odelN mber 3"irst "ield4 a"ter the val es "or ,tem 3second "ield4? %oth ,tem and 8odelN mber are character variables.

a. b. c. d.

in! in! in! in!

t P) ,tem *1. Y6 8odelN t P& ,tem *1. Y6 8odelN t Y) ,tem *1. P6 8odelN t Y) ,tem *1 Y6 8odelN

mber *#.< mber *#.< mber *#.< mber #.<

31&. $hich ,N>A- statement correctly reads the n meric val es "or 'ost 3third "ield4?

a. b. c. d.

in! in! in! in!

t Y6) 'ost ).2< t Y6) 'ost 1.2.< t Y6) 'ost comma).< t Y6) 'ost comma1.<

31). $hich SAS statement correctly ses "ormatted in! t to read the val es in this orderD ,tem 3"irst "ield4, Anit'ost 3second "ield4, S antity 3third "ield4?

a. b. c. d. e. ". g.

in! t Y6 ,tem *1. P6 Anit'ost comma&. Y60 S antity 3.< in! t ,tem *1. Y66 Anit'ost comma&. Y60 S antity 3.< in! t ,tem *1. P6 Anit'ost comma&. Y60 S antity 3.< all o" the above

310. $hich raw data "ile reE ires the >A( o!tion in the ,N2,B@ statement in order to correctly read the data sing either col mn in! t or "ormatted in! t? a.

b.

c.

d.

311. -he raw data "ile re"erenced by the "ilere" St dents contains data that is

a. b. c. d.

arranged in "ixed "ields "ree "ormat mixed "ormat arranged in col mns

455. $hich in! t style sho ld be sed to read the val es in the raw data "ile that is re"erenced by the "ilere" St dents?

a. b. c. d.

col mn "ormatted list mixed

456. $hich SAS !rogram was sed to create the raw data "ile -eamdat "rom the SAS data set $or:.Scores? SAS (ata Set $or:.Scores ?bs 6 2 3 4 Name Loe (ani Bisa 8atthew HighScore 0) )1 0# )& -eam %l e %eetles, ( rham /aleigh /acers, /aleigh Sand Shar:s, 'ary %l e %eetles, ( rham

a. b. c. d. e. ". g. h. i. G. :. l. m.

data +n ll+< set wor:.scores< "ile 'cDHdataHteamdat' dlm;','< ! t name highscore team< r n< data +n ll+< set wor:.scores< "ile 'cDHdataHteamdat' dlm;' '< ! t name highscore team< r n< data +n ll+< set wor:.scores<

n. o. !. E. r. s. t. .

"ile 'cDHdataHteamdat' dsd< ! t name highscore team< r n< data +n ll+< set wor:.scores< "ile 'cDHdataHteamdat'< ! t name highscore team< r n<

452. $hich SAS statement reads the raw data val es in order and assigns them to the variables shown below? KariablesD 2irstName 3character4, BastName 3character4, Age 3n meric4, School 3character4, 'lass 3n meric4

a. b. c. d. e. ".

in! t 2irstName * BastName * Age School * 'lass< in! t 2irstName BastName Age School 'lass< in! t 2irstName * 6.4 BastName * &.62 Age 64.6# School * 6).61 'lass 26< in! t 2irstName 6.4 BastName &.62 Age 64.6# School 6).61 'lass 26<

453. $hich SAS statement sho ld be sed to read the raw data "ile that is re"erenced by the "ilere" Salesre!?

a. b. c. d.

in"ile salesre!< in"ile salesre! 'D'< in"ile salesre! dlm< in"ile salesre! dlm;'D'<

454. $hich o" the "ollowing raw data "iles can be read by sing the 8,SS?K@/ o!tion in the ,N2,B@ statement? 8issing val es are indicated with colored bloc:s. a.

b.

c.

d.

45#. $hich SAS !rogram correctly reads the data in the raw data "ile that is re"erenced by the "ilere" Kol nteer?

a. b. c. d.

data !erm.contest< in"ile vol nteer< in! t 2irstName * BastName * Age School * 'lass< r n<

e. ". g. h. i. G. :. l. m. n. o. !. E. r.

data !erm.contest< in"ile vol nteer< length BastName * 66< in! t 2irstName * lastname * Age School * 'lass< r n< data !erm.contest< in"ile vol nteer< in! t 2irstName * lastname * Age School * 'lass< length BastName * 66< r n< data !erm.contest< in"ile vol nteer< in! t 2irstName * BastName * 66. Age School * 'lass< r n<

45&. $hich ty!e o" in! t sho ld be sed to read the val es in the raw data "ile that is re"erenced by the "ilere" Aniversity?

a. b. c. d.

col mn "ormatted list modi"ied list

45). $hich SAS statement correctly reads the val es "or 2lavor and S antity? 8a:e s re the length o" each variable can accommodate the val es that are shown.

a. b. c. d.

in! t 2lavor Z *1. S antity D comma.< in! t 2lavor Z *64. S antity D comma.< in! t 2lavor D *64. S antity Z comma.< in! t 2lavor *64. S antity D comma.<

450. $hich SAS statement correctly reads the raw data val es in order and assigns them to these corres!onding variablesD Cear 3n meric4, School 3character4, @nrolled 3n meric4?

a. b. c. d. e. ". g.

in! t Cear School Z *2). @nrolled D comma.< in! t Cear 6.4 School Z *2). @nrolled D comma.< in! t Y6 Cear 4. P6 School Z *2). @nrolled D comma.< all o" the above

451. SAS date val es are the n mber o" days since which date? a. Lan ary 6, 6155 b. Lan ary 6, 61#5 c. Lan ary 6, 61&5 d. Lan ary 6, 61)5 465. A great advantage o" storing dates and times as SAS n meric date and time val es is that a. they can easily be edited. b. they can easily be read and nderstood. c. they can be sed in text strings li:e other character val es. d. they can be sed in calc lations li:e other n meric val es. 466. SAS does not a tomatically ma:e adG stments "or daylight saving time, b t it does ma:e adG stments "or a. lea! seconds b. lea! years c. L lian dates d. time 9ones 462. An in! t data "ile has date ex!ressions in the "orm 65222556. $hich SAS in"ormat sho ld yo se to read these dates? a. (A-@&. b. (A-@0. c. 88((CC&. d. 88((CC0. 463. -he minim m width o" the -,8@w. in"ormat is a. 4 b. # c. & d. )

464. Shown below are date and time ex!ressions and corres!onding SAS datetime in"ormats. $hich date and time ex!resssion cannot be read by the in"ormat that is shown beside it? a. 358ay2555D65D53D6).2 (A-@-,8@25. b. 358ay55 65D53D6).2 (A-@-,8@60. c. 358ay2555Q65D53 (A-@-,8@6#. d. 358ay2555Q6553 (A-@-,8@64. 46#. $hat is the de"a lt val e o" the C@A/'A-?22; system o!tion? a. 6125 b. 6165 c. 6155 d. 6135 46&. S !!ose yo r in! t data "ile contains the date ex!ression 63A>/2551. -he C@A/'A-?22; system o!tion is set to 6165. SAS will read the date as a. 63A>/6151 b. 63A>/6125 c. 63A>/2551 d. 63A>/2525 46). S !!ose the C@A/'A-?22; system o!tion is set to 6125. An in! t "ile contains the date ex!ression 62Q50Q612#, which is being read with the 88((CC0. in"ormat. $hich date will a!!ear in yo r data? a. 50(@'6125 b. 50(@'612# c. 50(@'2561 d. 50(@'252# 460. S !!ose yo r !rogram creates two variables "rom an in! t "ile. %oth variables are stored as SAS date val esD 2irst(ay records the start o" a billing cycle, and Bast(ay records the end o" that cycle. -he code "or calc lating the total n mber o" days in the cycle wo ld be a. -ot(ays;lastday."irstday< b. -ot(ays;lastday."irstdayP6< c. -ot(ays;lastdayQ"irstday< d. Co cannot se date val es in calc lations. 461. Co can !osition the in! t !ointer on a s!eci"ic record by sing a. col mn !ointer controls. b. col mn s!eci"ications. c. line !ointer controls. d. line hold s!eci"iers. 425. $hich !ointer control is sed to read m lti!le records seE entially? a. Yn b. Pn c. Q d. all o" the above 426. $hich !ointer control can be sed to read records non.seE entially? a. Yn b. [n c. Pn d. Q

422. $hich SAS statement correctly reads the val es "or 2name, Bname, Address, 'ity, State, and \i! in order?

a. b. c. d. e. ". g. h. i. G. :. l.

in! t 2name * Bname * Q Address *25. Q 'ity * State * \i! *< in! t 2name * Bname * Q< Address *25. Q< 'ity * State * \i! *< in! t Q 2name * Bname * Q Address *25. 'ity * State * \i! *< in! t Q 2name * Bname *< Q Address *25.< 'ity * State * \i! *<

423. $hich ,N>A- statement correctly reads the val es "or ,( in the "o rth record, then ret rns to the "irst record to read the val es "or 2name and Bname?

a. b. c. d. e. ". g.

in! t [4 ,( *#. [6 2name * Bname *< in! t [4 ,( * 6.# [6 2name * Bname *< in! t [4 ,( * [6 2name * Bname *< all o" the above

424. How many records will be read "or each iteration o" the (A-A ste!?

data s!ring.s!ortswr< in"ile newitems< in! t [6 ,tem * 'olor * [3 Y0 >rice comma&. [2 2abric * [3 SOA * 6.&< r n< a. b. c. d. one two three "o r

42#. $hich ,N>A- statement correctly reads the val es "or 'ity, State, and \i!?

a. b. c. d.

in! t [3 'ity * State * \i! *< in! t [3 'ity Z *66. State * \i! *< in! t [3 'ity *66. P2 State *2. P 2 \i! *#.< all o" the above

42&. $hich !rogram does not read the val es in the "irst record as a variable named ,tem and the val es in the second record as two variables named ,nventory and -y!e?

a. b. c. d. e. ". g. h. i. G. :. l. m. n. o. !. E. r. s. t.

data !erm.s !!lies< in"ile instoc: !ad< in! t ,tem Z *6&. Q ,nventory 2. -y!e *0.< r n< data !erm.s !!lies< in"ile instoc: !ad< in! t ,tem Z *6&. Q ,nventory 2. -y!e *0.< r n< data !erm.s !!lies< in"ile instoc: !ad< in! t [6 ,tem Z *6&. ,nventory 2. -y!e *0.< r n< data !erm.s !!lies< in"ile instoc: !ad< in! t ,tem Z *6&. [2 ,nventory 2. -y!e *0.< r n<

42). $hich ,N>A- statement reads the val es "or Bname, 2name, (e!artment, and Salary 3in that order4?

a. b. c. d. e. ". g.

in! t [6 Bname * 2name * Q (e!artment *62. Salary comma65.< in! t [6 Bname * 2name * Q (e!artment D *62. Salary D comma.< in! t [6 Bname * 2name * [2 (e!artment D *62. Salary D comma.< both b and c

420. $hich raw data "ile !oses !otential !roblems when yo are reading m lti!le records "or each observation? a.

b.

c.

d.

421. $hich is tr e "or the do ble trailing at sign 3YY4? a. ,t enables the next ,N>A- statement to read "rom the c rrent record across m lti!le iterations o" the (A-A ste!. b. ,t m st be the last item that is s!eci"ied in the ,N>A- statement. c. ,t is released when the in! t !ointer moves !ast the end o" the record. d. All o" the above.

435. A record that is being held by a single trailing at sign 3Y4 is a tomatically released when a. the in! t !ointer moves !ast the end o" the record. b. the next iteration o" the (A-A ste! begins. c. another ,N>A- statement that has a single trailing at sign 3Y4 exec tes. d. another val e is read "rom the observation. 436. $hich SAS !rogram correctly creates a se!arate observation "or each bloc: o" data?

a. b. c. d. e. ". g. h. i. G. :. l. m. n. o. !.

ata !erm.!rod ce< in"ile "r it< in! t ,tem *4. Kariety D *65.< r n< data !erm.!rod ce< in"ile "r it< in! t ,tem *4. Kariety D *65. Y< r n< data !erm.!rod ce< in"ile "r it< in! t ,tem * Kariety D *65. YY< r n< data !erm.!rod ce< in"ile "r it YY< in! t ,tem *4. Kariety D *65.< r n<

432. $hich SAS !rogram segment reads the val es "or ,( and holds the record "or each val e o" S antity, so that three observations are created "or each record?

a. b. c. d. e. ". g. h. i.

data wor:.sales< in"ile nitsold< in! t ,( *< do wee:;6 to 3< in! t S antity D comma.< o t! t< end< r n< data wor:.sales<

G. :. l. m. n. o. !. E. r. s. t. . v. w. x. y. 9. aa. bb. cc. dd. ee. "".

in"ile nitsold< in! t ,( * YY< do wee:;6 to 3< in! t S antity D comma.< o t! t< end< r n< data wor:.sales< in"ile nitsold< in! t ,( * Y< do wee:;6 to 3< in! t S antity D comma.< o t! t< end< r n< data wor:.sales< in"ile nitsold< in! t ,( * Y< do wee:;6 to 3< in! t S antity D comma. Y< o t! t< end< r n<

433. $hich SAS statement re!etitively exec tes several statements when the val e o" an index variable named 'o nt ranges "rom 6 to #5, incremented by #? a. do co nt;6 to #5 by #< b. do while co nt;6 to #5 by #< c. do co nt;6 to #5 P #< d. do while 3co nt;6 to #5 P #4<

434. $hich o!tion below, when sed in a (A-A ste!, writes an observation to the data set a"ter each val e "or Activity has been read? a. b. c. d. e. ". g. h. i. G. :. l. m. n. o. do choice;6 to 3< in! t Activity D *65. Y< o t! t< end< r n< do choice;6 to 3< in! t Activity D *65. Y< end< o t! t< r n< do choice;6 to 3< in! t Activity D *65. Y< end< r n< a and b

43#. $hich SAS statement re!etitively exec tes several statements while the val e o" 'holesterol is greater than 255? a. do cholesterol F 255< b. do cholesterol gt 255< c. do while 3cholesterol F 2554< d. do while cholesterol F 255< 43&. $hich choice below is an exam!le o" a S m statement? a. total!ay;6< b. total!ayP6< c. total!ay=6< d. total!ay by 6< 43). $hich !rogram creates the SAS data set >erm.-o!store "rom the raw data "ile shown below?

SAS (ata Set >erm.-o!store Store 6556 6556 6556 6552 Sales ))6&3.61 )&054.)# )4304.2) )&&62.13 8onth 6 2 3 6

Store 6552 6552 6553 6553 a. b. c. d. e. ". g. h. i. G. :. l. m. n. o. !. E. r. s. t. . v. w. x. y. 9. aa. bb. cc.

Sales 064#&.34 025&3.1) 0260#.6& )1)42.33

8onth 2 3 6 2

data !erm.to!stores< in"ile sales10 missover< in! t Store Sales D comma. Y< do while 3sales ne .4< month P 6< o t! t< in! t sales D comma. Y< end< r n< data !erm.to!stores< in"ile sales10 missover< in! t Store Sales D comma. Y< do while 3sales ne .4< 8onth;5< month P 6< o t! t< in! t sales D comma. Y< end< r n< data !erm.to!stores< in"ile sales10 missover< in! t Store Sales D comma. 8onth Y< do while 3sales ne .4< month P 6< in! t sales D comma. Y< end< o t! t<

dd. r n< ee. "". gg. data !erm.to!stores< in"ile sales10 missover<

hh. ii. GG. ::. ll. mm. nn.

in! t Store Sales D comma. Y< 8onth;5< do while 3sales ne .4< month P 6< o t! t< in! t sales D comma. Y< end<

oo. r n< 430. How many observations are !rod ced by the (A-A ste! that reads this external "ile?

a. b. c. d.

3 # 62 6#

63H. #hen you write a /ATA step to create one observation per detail record you need to a. distinguish between header and detail records. b. Aeep the header record as part of each observation until the ne;t header record is encountered c. hold the current value of each record type so that the other values in the record can be read d. all of the above. 66 . #hich SAS statement checAs for the condition that *ecord eMuals . and e;ecutes a single statement to read the values for Amount, a. if record!c then input 83 Amount comma@.; b. if record!U.U then input 83 Amount comma@.; c. if record!U.U then do input 83 Amount cpmma@.; d. if record!. then do input 83 Amount comma@.; 661. #hich is true for the following statements 0P indicates a header record1, :f code!UPU then do; :f _n_Z1 then output; Total! ;

:nput 'ame 4 322 ; )nd; a. _'_ eMuals the number of times the /ATA step has begun to e;ecute. b. #hen code!UPU and _n_ Z 1 are true5 an %&T(&T statement is e;ecuted. c. )ach header record causes an observation to be written to the data set. d. a and b

662. #hat happens when the condition type!U(U is false, :f type!U(U then input 83 :/ 4>. 8H Address 42 .; )lse if type!UKU then input 83 .harge 9.; a. The values for :/ and Address are read. b. The values for charge are read. c. Type is assigned the value of K. d. The )=S) statement is e;ecuted. 663. #hat happens when last has a value other than Nero, /ata perm.househld 0drop!code1; :nfile citydata end!last; *etain Address; :nput type 41. 8; :f code!UAU then do; :f _n_ Z 1 then output; Total! ; :nput address 4 321@; )nd; )lse if code!U'U then totalG1; :f last then output; *un;

a. =ast has a value of 1. b. The %&T(&T statement writes the last observation to the data set. c. The current value of =ast is written to the data set. d. a and b.

Anda mungkin juga menyukai