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

2018-12-19 21:21

158 B 329 C 644 D

and the SAS data set WORK.TWO:

Id Char2 --- ----- 111 E 538 F 644 G

The following program is submitted:

data WORK.BOTH;

set WORK.ONE WORK.TWO; by Id; run;

What is the first observation in SAS data set WORK.BOTH?

A. Id Char1 Char2 --- ----- ----- 111 A

B.

Id Char1 Char2 --- ----- ----- 111 E

C.

Id Char1 Char2 --- ----- ----- 111 A E

D.

Id Char1 Char2 --- ----- ----- 644 D G

Answer: A

------------------------------------------------------------------ 51.The following program is submitted:

proc contents data=_all_; run;

Which statement best describes the output from the submitted program?

A. The output contains only a list of the SAS data sets that are contained in the WORK library.

B. The output displays only the contents of the SAS data sets that are contained in the WORK library.

C. The output displays only the variables in the SAS data sets that are contained in the WORK library.

D. The output contains a list of the SAS data sets that are contained in the WORK library and displays the contents of those data sets.

Answer: D

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

52.Given the SAS data set WORK.EMP_NAME:

Name EmpID ---- ----- Jill 1864 Jack 2121 Joan 4698 John 5463

Given the SAS data set WORK.EMP_DEPT:

EmpID Department ----- ----------

2121 Accounting 3567 Finance 4698 Marketing 5463 Accounting

The following program is submitted:

data WORK.ALL;

merge WORK.EMP_NAME(in=Emp_N) WORK.EMP_DEPT(in=Emp_D); by Empid;

if (Emp_N and not Emp_D) or (Emp_D and not Emp_N); run;

How many observations are in data set WORK.ALL after submitting the program?

A. 1 B. 2 C. 3 D. 5

Answer: B

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

53.The following SAS program is submitted:

data WORK.TOTAL_SALARY; retain Total;

set WORK.SALARY; by Department; if First.Department then Total=0;

Total=sum(Total, Wagerate); if Last.Total; run;

What is the initial value of the variable Total?

A. 0

B. Missing

C. The value of the first observations Wagerate

D. Cannot be determined from the information given

Answer: B

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

54.Consider the following data step:

data WORK.TEST;

set SASHELP.CLASS(obs=5); retain City 'Beverly Hills'; State='California'; run;

The computed variables City and State have their values assigned using two different methods, a RETAIN statement and an Assignment statement. Which statement regarding this program is true?

A. The RETAIN statement is fine, but the value of City will be truncated to 8 bytes as the LENGTH statement has been omitted.

B. Both the RETAIN and assignment statement are being used to initialize new variables and are equally efficient. Method used is a matter of programmer preference.

C. The assignment statement is fine, but the value of City will be truncated to 8 bytes as the LENGTH statement has been omitted.

D. City's value will be assigned one time, State's value 5 times.

Answer: D

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

55.The following SAS program is submitted:

data WORK.DATE_INFO; X=\ run;

Variable X contains what value?

A. the numeric value 0

B. the character value \ C. the date value 01011960

D. the code contains a syntax error and does not execute.

Answer: D 注意D前面有空格

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

56.The following output is created by the FREQUENCY procedure:

The FREQ Procedure

Table of region by product

region product

Frequency| Percent | Row Pct |

Col Pct |corn |cotton |oranges | Total ---------+--------+--------+--------+

EAST | 2 | 1 | 1 | 4 | 22.22 | 11.11 | 11.11 | 44.44

| 50.00 | 25.00 | 25.00 | | 50.00 | 33.33 | 50.00 | ---------+--------+--------+--------+

SOUTH | 2 | 2 | 1 | 5 | 22.22 | 22.22 | 11.11 | 55.56 | 40.00 | 40.00 | 20.00 | | 50.00 | 66.67 | 50.00 | ---------+--------+--------+--------+

Total 4 3 2 9 44.44 33.33 22.22 100.00

Which TABLES statement was used to completed the following program that produced the output?

proc freq data=sales; <_insert_code_> run;

A. tables region product; B. tables region,product C. tables region/product; D. tables region*product;

Answer: D

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

57.Given the SAS data set WORK.ONE:

N BeginDate - ---------

1 09JAN2010 2 12JAN2010

The following SAS program is submitted:

data WORK.TWO; set WORK.ONE;

Day=<_insert_code_>; format BeginDate date9.; run;

The data set WORK.TWO is created, where Day would be 1 for Sunday, 2 for Monday, 3 for Tuesday, ... :


SAS-base-考试必备-70真题(附答案)(7).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:石油化工企业消防战训工作的研究

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: