云文档网 - 专业文章范例文档资料分享平台

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

来源:网络收集 时间:2024-05-04 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xuecool-com或QQ:370150219 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

SAS Base认证考试—70题 Q 1

1. The following SAS program is submitted: data WORK.TOTAL;

set WORK.SALARY; by Department Gender;

if First.<_insert_code_> then Payroll=0; Payroll+Wagerate; if Last.<_insert_code_>; 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. Gender B. Department C. Gender Department D. Department Gender Q 2

Given 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,Current The following output is desired:

Obs Name Month Status Week1 Week2 Week3 Week4 Week5 1 John FEB Final $13 $25 $14 $27 .

1

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 $20 Which 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;

2

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 3

The following SAS program is submitted: data WORK.DATE_INFO; Day=\ Yr=1960 ; X=mdy(Day,01,Yr) ; run;

3

What is the value of the variable X? A. the numeric value 0

B. the character value \C. a missing value due to syntax errors

D. the step will not compile because of the character argument in the mdy function. Q 4

The Excel workbook REGIONS.XLS contains the following four worksheets: EAST WEST NORTH SOUTH

The 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.'NORTH'e;run; D. proc print data=MYXLS.'NORTH$'n;run; Q 5

Which 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' stop@10; C. infile 'customer.txt' obs=10;

4

D. input 'customer.txt' stop=10; Q 6

After 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 7

Which of the following choices is an unacceptable ODSdestination for producing output that can be viewed in Microsoft Excel? A. MSOFFICE2K

5

百度搜索“yundocx”或“云文档网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,云文档网,提供经典教育范文SAS base 70题(无答案版,适合练习)在线全文阅读。

SAS base 70题(无答案版,适合练习).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.yundocx.com/fanwen/1044659.html(转载请注明文章来源)
Copyright © 2018-2022 云文档网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:370150219 邮箱:370150219@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:7 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219