SAS-base-70题(无答案版-适合练习)

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

1SASBase认证考试—70题Q11.ThefollowingSASprogramissubmitted:dataWORK.TOTAL;setWORK.SALARY;byDepartmentGender;ifFirst._insert_code_thenPayroll=0;Payroll+Wagerate;ifLast._insert_code_;run;TheSASdatasetWORK.SALARYiscurrentlyorderedbyGenderwithinDepartment.WhichinsertedcodewillaccumulatesubtotalsforeachGenderwithinDepartment?A.GenderB.DepartmentC.GenderDepartmentD.DepartmentGenderQ2GiventhefollowingrawdatarecordsinTEXTFILE.TXT:----|----10---|----20---|----30John,FEB,13,25,14,27,FinalJohn,MAR,26,17,29,11,23,CurrentTina,FEB,15,18,12,13,FinalTina,MAR,29,14,19,27,20,CurrentThefollowingoutputisdesired:ObsNameMonthStatusWeek1Week2Week3Week4Week51JohnFEBFinal$13$25$14$27.22JohnMARCurrent$26$17$29$11$233TinaFEBFinal$15$18$12$13.4TinaMARCurrent$29$14$19$27$20WhichSASprogramcorrectlyproducesthedesiredoutput?A.dataWORK.NUMBERS;lengthName$4Month$3Status$7;infile'TEXTFILE.TXT'dsd;inputName$Month$;ifMonth='FEB'theninputWeek1Week2Week3Week4Status$;elseifMonth='MAR'theninputWeek1Week2Week3Week4Week5Status$;formatWeek1-Week5dollar6.;run;procprintdata=WORK.NUMBERS;run;B.dataWORK.NUMBERS;lengthName$4Month$3Status$7;infile'TEXTFILE.TXT'dlm=','missover;inputName$Month$;ifMonth='FEB'theninputWeek1Week2Week3Week4Status$;elseifMonth='MAR'theninputWeek1Week2Week3Week4Week5Status$;formatWeek1-Week5dollar6.;run;procprintdata=WORK.NUMBERS;run;C.dataWORK.NUMBERS;lengthName$4Month$3Status$7;3infile'TEXTFILE.TXT'dlm=',';inputName$Month$@;ifMonth='FEB'theninputWeek1Week2Week3Week4Status$;elseifMonth='MAR'theninputWeek1Week2Week3Week4Week5Status$;formatWeek1-Week5dollar6.;run;procprintdata=WORK.NUMBERS;run;D.dataWORK.NUMBERS;lengthName$4Month$3Status$7;infile'TEXTFILE.TXT'dsd@;inputName$Month$;ifMonth='FEB'theninputWeek1Week2Week3Week4Status$;elseifMonth='MAR'theninputWeek1Week2Week3Week4Week5Status$;formatWeek1-Week5dollar6.;run;procprintdata=WORK.NUMBERS;run;Q3ThefollowingSASprogramissubmitted:dataWORK.DATE_INFO;Day=01;Yr=1960;X=mdy(Day,01,Yr);run;4WhatisthevalueofthevariableX?A.thenumericvalue0B.thecharactervalue01011960C.amissingvalueduetosyntaxerrorsD.thestepwillnotcompilebecauseofthecharacterargumentinthemdyfunction.Q4TheExcelworkbookREGIONS.XLScontainsthefollowingfourworksheets:EASTWESTNORTHSOUTHThefollowingprogramissubmitted:libnameMYXLS'regions.xls';WhichPROCPRINTstepcorrectlydisplaystheNORTHworksheet?A.procprintdata=MYXLS.NORTH;run;B.procprintdata=MYXLS.NORTH$;run;C.procprintdata=MYXLS.'NORTH'e;run;D.procprintdata=MYXLS.'NORTH$'n;run;Q5Whichstatementspecifiesthatrecords1through10aretobereadfromtherawdatafilecustomer.txt?A.infile'customer.txt'1-10;B.input'customer.txt'stop@10;C.infile'customer.txt'obs=10;5D.input'customer.txt'stop=10;Q6AfteraSASprogramissubmitted,thefollowingiswrittentotheSASlog:101dataWORK.JANUARY;102setWORK.ALLYEAR(keep=productmonthnum_SoldCost);103ifMonth='Jan'thenoutputWORK.JANUARY;104Sales=Cost*Num_Sold;105keep=ProductSales;-----22ERROR22-322:Syntaxerror,expectingoneofthefollowing:!,!!,&,*,**,+,-,,=,,=,,=,AND,EQ,GE,GT,IN,LE,LT,MAX,MIN,NE,NG,NL,NOTIN,OR,^=,|,||,~=.106run;WhatchangesshouldbemadetotheKEEPstatementtocorrecttheerrorsintheLOG?A.keep=(ProductSales);B.keepProduct,Sales;C.keep=Product,Sales;D.keepProductSales;Q7WhichofthefollowingchoicesisanunacceptableODSdestinationforproducingoutputthatcanbeviewedinMicrosoftExcel?A.MSOFFICE2K6B.EXCELXPC.CSVALLD.WINXPQ8TheSASdatasetnamedWORK.SALARYcontains10observationsforeachdepartment,andiscurrentlyorderedbyDepartment.ThefollowingSASprogramissubmitted:dataWORK.TOTAL;setWORK.SALARY(keep=DepartmentMonthlyWageRate);byDepartment;ifFirst.Department=1thenPayroll=0;Payroll+(MonthlyWageRate*12);ifLast.Department=1;run;Whichstatementistrue?A.ThebystatementintheDATAstepcausesasyntaxerror.B.ThestatementPayroll+(MonthlyWageRate*12);inthedatastepcausesasyntaxerror.C.ThevaluesofthevariablePayrollrepresentthemonthlytotalforeachdepartmentintheWORK.SALARYdataset.D.ThevaluesofthevariablePayrollrepresentamonthlytotalforallvaluesofWAGERATEintheWORK.SALARYdataset.Q9datacourse;inputexam;datalines;50.17;run;procformat;valuescore1–50=‘Fail’51–100=‘Pass’;run;procreportdata=coursenowd;columnexam;defineexam/displayformat=score.;run;Whatisthevalueforexam?A.FailB.PassC.50.1D.NooutputQ10ThefollowingSASprogramissubmitted:dataWORK.RETAIL;Cost='$20.000';Discount=.10*Cost;run;Whatistheresult?A.ThevalueofthevariableDiscountintheoutputdatasetis2000.NomessagesarewrittentotheSASlog.B.ThevalueofthevariableDiscountintheoutputdatasetis2000.AnotethatconversionhastakenplaceiswrittentotheSASlog.C.ThevalueofthevariableDiscountintheoutputdatasetismissing.AnoteintheSASlogreferstoinvalidnumericdata.D.ThevariableDiscountintheoutputdatasetissettozero.NomessagesarewrittentotheSASlog.8Q11GiventheexistingSASprogram:procformat;valueagegrplow-12='Pre-Teen'13-high='Teen';run;procmeansdata=SASHELP.CLASS;varHeight;classSexAge;formatAgeagegrp.;run;Whichstatementintheprocmeansstepneedstobemodifiedoraddedtogeneratethefollowingresults:AnalysisVariable:HeightNSexAgeObsMinimumMaximumMean------------------------------------------

1 / 34
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功