SASBase认证考试70题5160Word格式.docx

上传人:b****5 文档编号:16028631 上传时间:2022-11-17 格式:DOCX 页数:9 大小:17.33KB
下载 相关 举报
SASBase认证考试70题5160Word格式.docx_第1页
第1页 / 共9页
SASBase认证考试70题5160Word格式.docx_第2页
第2页 / 共9页
SASBase认证考试70题5160Word格式.docx_第3页
第3页 / 共9页
SASBase认证考试70题5160Word格式.docx_第4页
第4页 / 共9页
SASBase认证考试70题5160Word格式.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

SASBase认证考试70题5160Word格式.docx

《SASBase认证考试70题5160Word格式.docx》由会员分享,可在线阅读,更多相关《SASBase认证考试70题5160Word格式.docx(9页珍藏版)》请在冰豆网上搜索。

SASBase认证考试70题5160Word格式.docx

Name 

EmpID

---- 

-----

Jill 

1864

Jack 

2121

Joan 

4698

John 

5463

GiventheSASdatasetWORK.EMP_DEPT:

EmpID 

Department

----- 

----------

2121 

Accounting

 

3567 

Finance

4698 

Marketing

5463 

dataWORK.ALL;

mergeWORK.EMP_NAME(in=Emp_N)

WORK.EMP_DEPT(in=Emp_D);

byEmpid;

if(Emp_NandnotEmp_D)or(Emp_DandnotEmp_N);

HowmanyobservationsareindatasetWORK.ALLaftersubmittingtheprogram?

A.1

B.2

C.3

D.5

B

MERGE合并数据集、IF子集

找出两个数据集中不重合的观测个数。

Q53

ThefollowingSASprogramissubmitted:

dataWORK.TOTAL_SALARY;

retainTotal;

setWORK.SALARY;

byDepartment;

ifFirst.Department

thenTotal=0;

Total=sum(Total,Wagerate);

ifLast.Total;

WhatistheinitialvalueofthevariableTotal?

A.0

B.Missing

C.ThevalueofthefirstobservationsWagerate

D.Cannotbedeterminedfromtheinformationgiven

RETAIN语句

retain语句是非执行语句。

retain;

/*针对所有变量*/

retainxy;

retainx1-x5;

retainx1-x510ab‘abc’;

retainx1-x5

(1);

/*x1=1,其余为缺失值*/

retainx1-x4(1234);

retainx1-x4(1:

4);

arrayarr

(2)xy;

retainarr;

Q54

Considerthefollowingdatastep:

dataWORK.TEST;

setSASHELP.CLASS(obs=5);

retainCity'

BeverlyHills'

;

State='

California'

run;

ThecomputedvariablesCityandStatehavetheirvaluesassignedusingtwodifferentmethods,aRETAINstatementandanAssignmentstatement.Whichstatementregardingthisprogramistrue?

A.TheRETAINstatementisfine,butthevalueofCitywillbetruncatedto8bytesastheLENGTHstatementhasbeenomitted.

B.BoththeRETAINandassignmentstatementarebeingusedtoinitializenewvariablesandareequallyefficient.Methodusedisamatterofprogrammerpreference.

C.Theassignmentstatementisfine,butthevalueofCitywillbetruncatedto8bytesastheLENGTHstatementhasbeenomitted.

D.City'

svaluewillbeassignedonetime,State'

svalue5times.

一般,SAS每读一遍DATA步的所有语句,PDV清空所有所有变量值,并设置为缺失值。

再执行INPUT语句或赋值语句,再次对变量赋值。

如果在DATA步中使用RETAIN语句,不会清空RETAIN对应的变量,保留到该变量下次再次被执行。

Q55

dataWORK.DATE_INFO;

X="

01Jan1960"

D;

VariableXcontainswhatvalue?

A.thenumericvalue0

B.thecharactervalue"

C.thedatevalue01011960

D.thecodecontainsasyntaxerroranddoesnotexecute.

日期时间的表示格式

起点:

1960年1月1日0时0分0秒。

若将日期时间标示为数值型常数,需使用相应格式。

格式值带单引号,后紧跟跟一个D(日期)、T(时间)、DT(日期时间)。

在表示为数值常数时,不支持MMDDYYw.格式,支持datew.格式。

本题,答案C,是因为X="

中D之前有个空格。

若改为X="

D;

,答案就是A。

01011960"

,答案就是D。

Q56

ThefollowingoutputiscreatedbytheFREQUENCYprocedure:

TheFREQProcedure

Tableofregionbyproduct

region 

product

Frequency|

Percent 

|

RowPct 

ColPct 

|corn 

|cotton 

|oranges| 

Total

---------+--------+--------+--------+

EAST 

2| 

1| 

4

22.22| 

11.11| 

44.44

50.00| 

25.00| 

25.00|

33.33| 

50.00|

SOUTH 

5

55.56

40.00| 

20.00|

66.67| 

Total 

9

44.44 

33.33 

22.22 

100.00

WhichTABLESstatementwasusedtocompletedthefollowingprogramthatproducedtheoutput?

procfreqdata=sales;

<

_insert_code_>

A.tablesregionproduct;

B.tablesregion,product

C.tablesregion/product;

D.tablesregion*product;

PROCFREQ过程

参考第47题。

Q57

GiventheSASdatasetWORK.ONE:

BeginDate

---------

09JAN2010

12JAN2010

dataWORK.TWO;

setWORK.ONE;

Day=<

formatBeginDatedate9.;

ThedatasetWORK.TWOiscreated,whereDaywouldbe1forSunday,2forMonday,3forTuesday,...:

WORK.TWO

B

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 成人教育 > 成考

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1