资源描述:
《SASBase认证考试(70真题+答案详解).doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、.SASBase认证考试—70题SAS分多个认证种类:base,advanced,clinic等,但大多需要先通过base认证。但凡这类商业组织提供的考证,基本都是题库型,所以想考过难度并不大。对于只想拿SAS认证的人,如果熟练掌握网上流传甚广的sas真题70题,通过base认证基本就没问题。Q11.ThefollowingSASprogramissubmitted:dataWORK.TOTAL;setWORK.SALARY;byDepartmentGender;ifFirst.<_insert_code_>thenPayroll=0;Payroll
2、+Wagerate;ifLast.<_insert_code_>;run;TheSASdatasetWORK.SALARYiscurrentlyorderedbyGenderwithinDepartment.WhichinsertedcodewillaccumulatesubtotalsforeachGenderwithinDepartment?A.GenderB.DepartmentC.GenderDepartmentD.DepartmentGender答案:A本题知识点:自动变量在SAS读取数据时,在PDV过程中会产生很多自动变量,在输出的数据集
3、中是不可见的。·FIRST.VARIABLE:同一个BY变量(组),若新的变量值第一次出现时,其first.variable值为1。·LAST.VARIABLE:同一个BY变量(组),若新的变量值最后一次出现时,其last.variable值为1。另外,在BY变量右面有多个变量时,先按第一个变量排序,若第一个变量的观测存在重复时,才按第二个变量排序。Q2word资料.GiventhefollowingrawdatarecordsinTEXTFILE.TXT:----
4、----10---
5、----20---
6、----30John,FEB,13,25,1
7、4,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.2JohnMARCurrent$26$17$29$11$233TinaFEBFinal$15$18$12$13.4TinaMARCurrent$29$14$19$27
8、$20WhichSASprogramcorrectlyproducesthedesiredoutput?A.dataWORK.NUMBERS;lengthName$4Month$3Status$7;infile'TEXTFILE.TXT'dsd;inputName$Month$;ifMonth='FEB'theninputWeek1Week2Week3Week4Status$;elseifMonth='MAR'theninputWeek1Week2Week3Week4Week5Status$;formatWeek1-Week5dollar6.;run
9、;procprintdata=WORK.NUMBERS;run;B.dataWORK.NUMBERS;lengthName$4Month$3Status$7;infile'TEXTFILE.TXT'dlm=','missover;inputName$Month$;ifMonth='FEB'theninputWeek1Week2Week3Week4Status$;word资料.elseifMonth='MAR'theninputWeek1Week2Week3Week4Week5Status$;formatWeek1-Week5dollar6.;run;
10、procprintdata=WORK.NUMBERS;run;C.dataWORK.NUMBERS;lengthName$4Month$3Status$7;infile'TEXTFILE.TXT'dlm=',';inputName$Month$@;ifMonth='FEB'theninputWeek1Week2Week3Week4Status$;elseifMonth='MAR'theninputWeek1Week2Week3Week4Week5Status$;formatWeek1-Week5dollar6.;run;procprintdata=W
11、ORK.NUMBERS;run;D.dataWORK.NUMBERS;lengthName$4Month$3