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

当前位置:首页 > SAS base 考试必备 70真题(附答案)

SAS base 考试必备 70真题(附答案)

  • 62 次阅读
  • 3 次下载
  • 2025/12/11 16:43:29

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.

Answer: C

-------------------------------------

10.The 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.

Answer: C 因为有一个$符号 -------------------------------------

11.Given 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 added to 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;

Answer: C

-------------------------------------

12.The Excel workbook QTR1.XLS contains the following three worksheets: JAN FEB MAR

Which 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);

Answer: A

-------------------------------------

13.The following SAS program is submitted:

data WORK.TEST;

set WORK.MEASLES(keep=Janpt Febpt Marpt); array Diff{3} Difcount1-Difcount3; array Patients{3} Janpt Febpt Marpt; run;

What new variables are created?

A. Difcount1, Difcount2 and Difcount3 B. Diff1, Diff2 and Diff3 C. Janpt, Febpt, and Marpt

D. Patients1, Patients2 and Patients3

Answer: A

-------------------------------------

14.Which 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;

Answer: c

-------------------------------------

15.Which 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.

Answer: D

-------------------------------------

16.The following SAS program is submitted:

data WORK.DATE_INFO; X='04jul2005'd; 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.

Answer: B

-------------------------------------

17.Given the following data step:

data WORK.GEO;

搜索更多关于: SAS base 考试必备 70真题(附答案) 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
本文作者:...

共分享92篇相关文档

文档简介:

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

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com