好文档 - 专业文书写作范文服务资料分享网站

SAS_Base认证考试—70题(31_40)

天下 分享 时间: 加入收藏 我要投稿 点赞

.word可编辑.

SAS Base认证考试—70题(31-40)

Q 31

Given the following raw data records in DATAFILE.TXT: ----|----10---|----20---|----30 Kim,Basketball,Golf,Tennis Bill,Football Tracy,Soccer,Track

The following program is submitted: data WORK.SPORTS_INFO;

length Fname Sport1-Sport3 $ 10; infile 'DATAFILE.TXT' dlm=','; input Fname Sport1 run;

proc print data=WORK.SPORTS_INFO; run;

Which output is correct based on the submitted program? A.

Obs Fname Sport1 Sport2 Sport3

. 专业.专注 .

Sport2 Sport3 ;

.word可编辑.

1 Kim Basketball Golf Tennis 2 Bill Football

3 Tracy Soccer Track B.

Obs Fname Sport1 Sport2 Sport3 1 Kim Basketball Golf Tennis 2 Bill Football Football Football 3 Tracy Soccer Track Track C.

Obs Fname Sport1 Sport2 Sport3 1 Kim Basketball Golf Tennis 2 Bill Football Tracy Soccer D.

Obs Fname Sport1 Sport2 Sport3 1 Kim Basketball Golf Tennis 2 Bill Football

答案:C

. 专业.专注 .

.word可编辑.

本题知识点:INFILE语句选项MISSOVER

参考第5题。 Q 32

Consider the following data step: data WORK.NEW; set WORK.OLD; Count+1; run;

The variable Count is created using a sum statement. Which statement regarding this variable is true?

A. It is assigned a value 0 when the data step begins execution.

B. It is assigned a value of missing when the data step begins execution. C. It is assigned a value 0 at compile time. D. It is assigned a value of missing at compile time.

答案:C

本题知识点:累加语句

. 专业.专注 .

.word可编辑.

variable + expression;

等价于

retain varibale 0; vaiable=variable+1;

变量必须是数值类型,初始值只能是0。 x+1;

x+(-1); /*每次执行减少1,不能写成x-1*/

x+(y=z); /*若y=z,返回1,则x累加1,否则不累加*/

在实际中,一般使用retain语句代替累加语句。retain语句的初始值可以是一个非零值。 Q 33

The following SAS program is submitted: data WORK.TEST; set WORK.PILOTS;

if Jobcode='Pilot2' then Description='Senior Pilot'; else Description='Unknown'; run;

The value for the variable Jobcode is: PILOT2.

. 专业.专注 .

.word可编辑.

What is the value of the variable Description? A. PILOT2 B. Unknown C. Senior Pilot

D. ' ' (missing character value)

答案:B

本题知识点:SAS中的大小写

在SAS中,语句是不区分大小写的,但是字符型变量的数据值是区分大小写的。 Q 34

A user-defined format has been created using the FORMAT procedure. How is it stored? A. in a SAS catalog

B. in a memory resident lookup table C. in a SAS dataset in the WORK library

D. in a SAS dataset in a permanent SAS data library

答案:A

. 专业.专注 .

SAS_Base认证考试—70题(31_40)

.word可编辑.SASBase认证考试—70题(31-40)Q31GiventhefollowingrawdatarecordsinDATAFILE.TXT:----|----10---|----20---|----30Kim,Basketball,Golf,TennisBill,FootballTr
推荐度:
点击下载文档文档为doc格式
5hopp6npf23gzju6vsv034ka295j7z00cyx
领取福利

微信扫码领取福利

微信扫码分享