sas-base-70题(无答案版-适合练习).doc

上传人:F****n 文档编号:98087521 上传时间:2019-09-08 格式:DOCX 页数:34 大小:39.96KB
返回 下载 相关 举报
sas-base-70题(无答案版-适合练习).doc_第1页
第1页 / 共34页
sas-base-70题(无答案版-适合练习).doc_第2页
第2页 / 共34页
sas-base-70题(无答案版-适合练习).doc_第3页
第3页 / 共34页
sas-base-70题(无答案版-适合练习).doc_第4页
第4页 / 共34页
sas-base-70题(无答案版-适合练习).doc_第5页
第5页 / 共34页
点击查看更多>>
资源描述

《sas-base-70题(无答案版-适合练习).doc》由会员分享,可在线阅读,更多相关《sas-base-70题(无答案版-适合练习).doc(34页珍藏版)》请在金锄头文库上搜索。

1、SAS Base认证考试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

2、 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 out

3、put 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

4、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; lengt

5、h 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.N

6、UMBERS; 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 W

7、ORK.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

8、 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 C. a missing value due to syntax errorsD. the step will not compile because of the character argument in the mdy function

9、.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 pr

10、int 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 SA

11、S 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 followin

12、g: !, !, &, *, *, +, -, , =, , =, , =, 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 7W

13、hich 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 Mon

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 教学/培训

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号