




已閱讀5頁,還剩29頁未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
此文檔收集于網(wǎng)絡(luò),僅供學(xué)習(xí)與交流,如有侵權(quán)請(qǐng)聯(lián)系網(wǎng)站刪除SAS Base認(rèn)證考試70題Q 11. The following SAS program is submitted:data WORK.TOTAL; set WORK.SALARY; by Department Gender; if First. then Payroll=0; Payroll+Wagerate; if Last.;run;The SAS data set WORK.SALARY is currently ordered by Gender within Department.Which inserted code will accumulate subtotals for each Gender within Department?A. GenderB. DepartmentC. Gender DepartmentD. Department GenderQ 2Given the following raw data records in TEXTFILE.TXT: -|-10-|-20-|-30 John,FEB,13,25,14,27,Final John,MAR,26,17,29,11,23,Current Tina,FEB,15,18,12,13,Final Tina,MAR,29,14,19,27,20,CurrentThe following output is desired: Obs Name Month Status Week1 Week2 Week3 Week4 Week5 1 John FEB Final $13 $25 $14 $27 . 2 John MAR Current $26 $17 $29 $11 $23 3 Tina FEB Final $15 $18 $12 $13 . 4 Tina MAR Current $29 $14 $19 $27 $20Which SAS program correctly produces the desired output?A. data WORK.NUMBERS; length Name $ 4 Month $ 3 Status $ 7; infile TEXTFILE.TXT dsd; input Name $ Month $; if Month=FEB then input Week1 Week2 Week3 Week4 Status $; else if Month=MAR then input Week1 Week2 Week3 Week4 Week5 Status $; format Week1-Week5 dollar6.; run; proc print data=WORK.NUMBERS; run;B. data WORK.NUMBERS; length Name $ 4 Month $ 3 Status $ 7; infile TEXTFILE.TXT dlm=, missover; input Name $ Month $; if Month=FEB then input Week1 Week2 Week3 Week4 Status $; else if Month=MAR then input Week1 Week2 Week3 Week4 Week5 Status $; format Week1-Week5 dollar6.; run; proc print data=WORK.NUMBERS; run;C. data WORK.NUMBERS; length Name $ 4 Month $ 3 Status $ 7; infile TEXTFILE.TXT dlm=,; input Name $ Month $ ; if Month=FEB then input Week1 Week2 Week3 Week4 Status $; else if Month=MAR then input Week1 Week2 Week3 Week4 Week5 Status $; format Week1-Week5 dollar6.; run; proc print data=WORK.NUMBERS; run;D. data WORK.NUMBERS; length Name $ 4 Month $ 3 Status $ 7; infile TEXTFILE.TXT dsd ; input Name $ Month $; if Month=FEB then input Week1 Week2 Week3 Week4 Status $; else if Month=MAR then input Week1 Week2 Week3 Week4 Week5 Status $; format Week1-Week5 dollar6.; run; proc print data=WORK.NUMBERS; run;Q 3The following SAS program is submitted:data WORK.DATE_INFO; Day=01 ; Yr=1960 ; X=mdy(Day,01,Yr) ;run;What is the value of the variable X?A. the numeric value 0B. the character value 01011960C. a missing value due to syntax errorsD. the step will not compile because of the character argument in the mdy function.Q 4The Excel workbook REGIONS.XLS contains the following four worksheets: EAST WEST NORTH SOUTHThe following program is submitted: libname MYXLS regions.xls;Which PROC PRINT step correctly displays the NORTH worksheet?A. proc print data=MYXLS.NORTH;run;B. proc print data=MYXLS.NORTH$;run;C. proc print data=MYXLS.NORTHe;run;D. proc print data=MYXLS.NORTH$n;run;Q 5Which statement specifies that records 1 through 10 are to be read from the raw data file customer.txt?A. infile customer.txt 1-10;B. input customer.txt stop10;C. infile customer.txt obs=10;D. input customer.txt stop=10; Q 6After a SAS program is submitted, the following is written to the SAS log: 101 data WORK.JANUARY; 102 set WORK.ALLYEAR(keep=product month num_Sold Cost); 103 if Month=Jan then output WORK.JANUARY; 104 Sales=Cost * Num_Sold; 105 keep=Product Sales; - 22 ERROR 22-322: Syntax error, expecting one of the following: !, !, &, *, *, +, -, , =, , =, , =, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, =, |, |, =. 106 run;What changes should be made to the KEEP statement to correct the errors in the LOG?A. keep=(Product Sales);B. keep Product, Sales;C. keep=Product, Sales;D. keep Product Sales;Q 7Which of the following choices is an unacceptable ODSdestination for producing output that can be viewed in Microsoft Excel?A. MSOFFICE2KB. EXCELXPC. CSVALLD. WINXPQ 8The SAS data set named WORK.SALARY contains 10 observations for each department, and is currently ordered by Department.The following SAS program is submitted: data WORK.TOTAL; set WORK.SALARY(keep=Department MonthlyWageRate); by Department; if First.Department=1 then Payroll=0; Payroll+(MonthlyWageRate*12); if Last.Department=1; run;Which statement is true?A. The by statement in the DATA step causes a syntax error.B. The statement Payroll+(MonthlyWageRate*12); in the data step causes a syntax error.C. The values of the variable Payroll represent the monthly total for each department in the WORK.SALARY data set.D. The values of the variable Payroll represent a monthly total for all values of WAGERATE in the WORK.SALARY data set.Q 9data course;input exam;datalines;50.1;run;proc format;value score 1 50 = Fail 51 100 = Pass;run;proc report data =course nowd;column exam;define exam / display format=score.;run;What is the value for exam?A. FailB. PassC. 50.1D. No outputQ 10The following SAS program is submitted: data WORK.RETAIL; Cost=$20.000; Discount=.10*Cost; run;What is the result?A. The value of the variable Discount in the output data set is 2000. No messages are written to the SAS log.B. The value of the variable Discount in the output data set is 2000. A note that conversion has taken place is written to the SAS log.C. The value of the variable Discount in the output data set is missing. A note in the SAS log refers to invalid numeric data.D. The variable Discount in the output data set is set to zero. No messages are written to the SAS log.Q 11Given the existing SAS program: proc format; value agegrp low-12 =Pre-Teen 13-high = Teen; run; proc means data=SASHELP.CLASS; var Height; class Sex Age; format Age agegrp.; run;Which statement in the proc means step needs to be modified or addedto generate the following results:Analysis Variable : Height N Sex Age Obs Minimum Maximum Mean - F Pre-Teen 3 51.3 59.8 55.8 Teen 6 56.5 66.5 63.0 M Pre-Teen 4 57.3 64.8 59.7 Teen 6 62.5 72.0 66.8 -A. var Height / nobs min max mean maxdec=1;B. proc means data=SASHELP.CLASS maxdec=1 ;C. proc means data=SASHELP.CLASS min max mean maxdec=1;D. output nobs min max mean maxdec=1;Q 12The Excel workbook QTR1.XLS contains thefollowing three worksheets: JAN FEB MARWhich statement correctly assigns a library reference to the Excel workbook?A. libname qtrdata qtr1.xls;B. libname qtr1.xls sheets=3;C. libname jan feb mar qtr1.xls;D. libname mydata qtr1.xls WORK.heets=(jan,feb,mar);Q 13The following SAS program is submitted:data WORK.TEST; set WORK.MEASLES(keep=Janpt Febpt Marpt); array Diff3 Difcount1-Difcount3; array Patients3 Janpt Febpt Marpt;run;What new variables are created?A. Difcount1, Difcount2 and Difcount3B. Diff1, Diff2 and Diff3C. Janpt, Febpt, and MarptD. Patients1, Patients2 and Patients3Q 14Which of the following programs correctly invokes the DATA Step Debugger:A. data WORK.TEST debug; set WORK.PILOTS; State=scan(cityState,2, ); if State=NE then description=Central;run;B. data WORK.TEST debugger; set WORK.PILOTS; State=scan(cityState,2, ); if State=NE then description=Central;run;C. data WORK.TEST / debug; set WORK.PILOTS; State=scan(cityState,2, ); if State=NE then description=Central;run;D. data WORK.TEST / debugger; set WORK.PILOTS; State=scan(cityState,2, ); if State=NE then description=Central;run;Q 15Which statement is true concerning the SAS automatic variable _ERROR_?A. It cannot be used in an if/then condition.B. It cannot be used in an assignment statement.C. It can be put into a keep statement or keep= option.D. It is automatically dropped.Q 16The following SAS program is submitted:data WORK.DATE_INFO; X=04jul2005d; DayOfMonth=day(x); MonthOfYear=month(x); Year=year(x);run;What types of variables are DayOfMonth, MonthOfYear, and Year?A. DayOfMonth, Year, and MonthOfYear are character.B. DayOfMonth, Year, and MonthOfYear are numeric.C. DayOfMonth and Year are numeric. MonthOfYear is character.D. DayOfMonth, Year, and MonthOfYear are date values.Q 17Given the following data step:data WORK.GEO; infile datalines; input City $20.; if City=Tulsa then State=OK; Region=Central; if City=Los Angeles then State=CA; Region=Western;datalines;TulsaLos AngelesBangor;run;After data step execution, what will data set WORK.GEO contain?A.City State Region - - - Tulsa OK Western Los Angeles CA Western Bangor WesternB.City State Region - - - Tulsa OK Western Los Angeles CA Western BangorC.City State Region - - - Tulsa OK Central Los Angeles CA Western Bangor WesternD.City State Region - - - Tulsa OK Central Los CA Western BangorQ 18Which statement describes a characteristic of the SAS automatic variable _ERROR_?A. The _ERROR_ variable maintains a count of the number of data errors in a DATA step.B. The _ERROR_ variable is added to the program data vector and becomes part of the data set being created.C. The _ERROR_ variable can be used in expressions in the DATA step.D. The _ERROR_ variable contains the number of the observation that caused the data error.Q 19The SAS data set WORK.ONE contains a numeric variable named Num and a character variable named Char: WORK.ONE Num Char - - 1 23 3 23 1 77The following SAS program is submitted:proc print data=WORK.ONE; where Num=1;run;What is output?A.Num Char - - 1 23B.Num Char - - 1 23 1 77C.Num Char - - 1 23 3 23 1 77D. No output is generated.Q 20The data set WORK.REALESTATE has the variable LocalFee with a format of 9. and a variable CountryFee with a format of 7.;The following SAS program is submitted:data WORK.FEE_STRUCTURE; format LocalFee CountryFee percent7.2; set WORK.REALESTAT; LocalFee=LocalFee/100; CountryFee=CountryFee/100;run;What are the formats of the variables LOCALFEE and COUNTRYFEE in the output dataset?A. LocalFee has format of 9. and CountryFee has a format of 7.B. LocalFee has format of 9. and CountryFee has a format of percent7.2C. Both LocalFee and CountryFee have a format of percent7.2D. The data step fails execution; there is no format for LocalFee.Q 21Given the SAS data set WORK.PRODUCTS: ProdId Price ProductType Sales Returns - - - - - K12S 95.50 OUTDOOR 15 2 B132S 2.99 CLOTHING 300 10 R18KY2 51.99 EQUIPMENT 25 5 3KL8BY 6.39 OUTDOOR 125 15 DY65DW 5.60 OUTDOOR 45 5 DGTY23 34.55 EQUIPMENT 67 2The following SAS program is submitted:data WORK.OUTDOOR WORK.CLOTH WORK.EQUIP; set WORK.PRODUCTS; if Sales GT 30; if ProductType EQ OUTDOOR then output WORK.OUTDOOR; else if ProductType EQ CLOTHING then output WORK.CLOTH; else if ProductType EQ EQUIPMENT then output WORK.EQUIP;run;How many observations does the WORK.OUTDOOR data set contain?A. 1B. 2C. 3D. 6Q 22Which step displays a listing of all the data sets in the WORK library?A. proc contents lib=WORK run;B. proc contents lib=WORK.all;run;C. proc contents data=WORK._all_; run;D. proc contents data=WORK _ALL_; run;Q 23Which is a valid LIBNAME statement?A. libname _SAS_data_library_location_;B. sasdata libname _SAS_data_library_location_;C. libname sasdata _SAS_data_library_location_;D. libname sasdata sas _SAS_data_library_location_;Q 24Given the following raw data records: -|-10-|-20-|-30 Susan*12/29/1970*10 Michael*6The following output is desired: Obs employee bdate years 1 Susan 4015 10 2 Michael . 6Which SAS program correctly reads in the raw data?A. data employees; infile file specification dlm=*; input employee $ bdate : mmddyy10. years; run;B. data employees; infile file specification dsd=*; input employee $ bdate mmddyy10. years; run;C. data employees; infile file specification dlm dsd; input employee $ bdate mmddyy10. years; run;D. data employees; infile file specification dlm=* dsd; input employee $ bdate : mmddyy10. years; run;Q 25Given the following code:proc print data=SASHELP.CLASS(firstobs=5 obs=15); where Sex=M;run;How many observations will be displayed?A. 11B. 15C. 10 or fewerD. 11 or fewerQ 26Which step sorts the observations of a permanent SAS data set by two variables and stores the sorted observations in a temporary SAS data set?A. proc sort out=EMPLOYEES data=EMPSORT; by Lname and Fname; run;B. proc sort data=SASUSER.EMPLOYEES out=EMPSORT; by Lname Fname; run;C. proc sort out=SASUSER.EMPLOYEES data=WORK.EMPSORT; by Lname Fname; run;D. proc sort data=SASUSER.EMPLOYEES out=SASUSER.EMPSORT; by Lname and Fname; run;Q 27Given the SAS data set WORK.TEMPS: Day Month Temp - - - 1 May 75 15 May 70 15 June 80 3 June 76 2 July 85 14 July 89The following program is submitted: proc sort data=WORK.TEMPS; by descending Month Day; run; proc print data=WORK.TEMPS; run;Which output is correct?A.Obs Day Month Temp- - - -1 2 July 852 14 July 893 3 June 764 15 June 805 1 May 756 15 May 7B.Obs Day Month Temp- - - -1 1 May 752 2 July 853 3 June 764 14 July 895 15 May 706 15 June 80C.Obs Day Month Temp- - - -1 1 May 752 15 May 703 3 June 764 15 June 805 2 July 856 14 July 89D.Obs Day Month Temp- - - -1 15 May 702 1 May 753 15 June 804 3 June 765 14 July 896 2 July 85Q 28Given the SAS data set WORK.P2000: Location Pop2000 - - Alaska 626931 Delaware 783595 Vermont 608826 Wyoming 493782and the SAS data set WORK.P2008: State Pop2008 - - Alaska 686293 Delaware 873092 Wyoming 532668The following output is desired: Obs State Pop2000 Pop2008 Difference 1 Alaska 626931 686293 59362 2 Delaware 783595 873092 89497 3 Wyoming 493782 532668 38886Which SAS program correctly combines the data?A. data compare; merge WORK.P2000(in=_a Location=State) WORK.P2008(in=_b); by State; if _a and _b; Difference=Pop2008-Pop2000;run;B. data compare; merge WORK.P2000(rename=(Location=State) WORK.P2008; by State; if _a and _b; Difference=Pop2008-Pop2000;run;C. data compare; merge WORK.P2000(in=_a rename=(Location=State) WORK.P2008(in=_b); by State; if _a and _b; Difference=Pop2008-Pop2000;run;D. data compare; merge WORK.P2000(in=_a) (rename=(Location=State) WORK.P2008(in=_b); by State; if _a and _b; Difference=Pop2008-Pop2000;run;Q 29The following SAS program is sumbitted:data WORK.INFO; infile DATAFILE.TXT; input 1 Company $20. 25 State $2. ; if State= then input 30 Year; e
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 預(yù)防擁擠踩踏班會(huì)課件
- 攜手抗疫守護(hù)健康
- 我為健康而來主題演講大綱
- 健康飲食產(chǎn)業(yè)園項(xiàng)目風(fēng)險(xiǎn)管理方案
- 電網(wǎng)側(cè)獨(dú)立儲(chǔ)能示范項(xiàng)目資金申請(qǐng)報(bào)告(參考)
- 2025年高效的鍋爐鼓、引風(fēng)機(jī)項(xiàng)目發(fā)展計(jì)劃
- 系統(tǒng)解剖學(xué)試題(附參考答案)
- 2025年環(huán)保節(jié)能型冷卻塔項(xiàng)目合作計(jì)劃書
- 物業(yè)管理企業(yè)財(cái)務(wù)管理規(guī)定
- 武漢體育學(xué)院附屬體育運(yùn)動(dòng)學(xué)校招聘真題
- 2024-2025學(xué)年下學(xué)期高一數(shù)學(xué)人教A版期末必刷??碱}之頻率與概率
- 設(shè)備易損配件管理制度
- 青霉素過敏反應(yīng)的急救
- 2025-2030中國鋁業(yè)發(fā)展?fàn)顩r與投資戰(zhàn)略研究報(bào)告
- 2025年國家醫(yī)療器械抽檢品種檢驗(yàn)方案
- 防汛物資儲(chǔ)備定額編制規(guī)程(SL298-2024)
- 無人機(jī)培訓(xùn)創(chuàng)業(yè)計(jì)劃書-20250205-222450
- 輿情分析試題及答案
- 營(yíng)運(yùn)車輛入股協(xié)議書
- 高中數(shù)學(xué)專項(xiàng)提升計(jì)劃
- 2025年國家公務(wù)員考錄《申論》真題及參考答案(行政執(zhí)法卷)
評(píng)論
0/150
提交評(píng)論