2025年SAS基础技能精通认证指南_第1页
2025年SAS基础技能精通认证指南_第2页
2025年SAS基础技能精通认证指南_第3页
2025年SAS基础技能精通认证指南_第4页
2025年SAS基础技能精通认证指南_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

SASBase认证考试一70题(61・70)

Q61

Consider(hedatastep:

dataWORK.TEST;

infile'c:\classl.csv'dsd;

inputNameSexIQAgeHeightWeight;

ifAgeNE16andAgeNE15thenGroup=1;

elseGroup=2;

run;

WhichstatementproducesafunctionallyequivalentresultforassigningGroupavalue?

A.ifAgenotin(15,16)thenGroup=l;elseGroup=2;

B.if(AgeNE16)or(AgeNE15)thenGroup=1;elseGroup=2;

C.whereAgenotbetween15and16thenGroup=I;elseGroup=2;

D.bothAorCwillwork.

答案:A

本题知识点:IF语句、IN的使用

参照第17题。

Q62

ThefollowingSASprogramissubmitted:

<_insert_ods_code>

procmeansdata=SASUSER.SHOES;

whereProductin('Sandal','Slipper','Boot");

run;

<insciludscode>

WhichODSstatements,insertedinthetwolocationsabove,createareportstoredinanhtmlfile?

A.odshtmlopen-sales.html';

odshtmlclose;

B.odsfile-sales.hdnl'/html;

ods;

C.odshtmlfilc='salcs.htmr;

odshtmlclose;

D.ods'sales.html';

ods;

答案:C

本题知识点:PROCCOTENTS过程

ODS的重要输出目的:LISTNG、RESULTS,OUTPUT.HTML、CSVALL、RTF,PDF、其他。

ODSHTML合用于数据较少的数据集、或汇总的数据集,如TABULATE过程。

Q63

ThefollowingSASprogramissubmitted:

dataWORK.OUTDS;

doun(il(ProdGT6);

Prod+1;

end;

inn;

WhatisthevalueofthevariableProdintheoutputdataset?

A..(missing)

B.6

C.7

D.Undetermined,infiniteloop.

答案:C

本题知识点:WHERE语句

参照第40题。

Q64

ThefollowingSASprogramissubmitted:

datawork.accounting;

lengthjobcodeS12;

setwork.dcpartmcnt;

run;

TheWORK.DEPARTMENTSASdatasetcontainsacharactervariablenamedJOBCODEwithalengthof

5.

WhichofthefollowingisthelengthofthevariableJOBCODEintheoutputdataset?

A.5

B.8

C.12

D.TheIciigllicannotbedclciminedasllicpiogiamfailbLuexcuulcduelucuois.

答案:c

本题知识点:LENGTH语句

LEGTH规定的是变量的字节长度,不是格式,不能含小数点。

LENGTHvariable-specificaticn(s)<DEFAULT=n>

其中,DEFAULT』是规定新定的数值变量的默认长度8改为n,

•数值变量

对于数值变量,LENGTH范围为3-8字节。LENGTH可放在任意位置。

在PROCSQL中ALERT不能变化数值变量长度。

字符变量

对于字符变量,LENGTH危围为1-32767字节,空格占一种字符。LENGTH必须放在SET语句之前。

实际上,较少使用LENGTH语句,而是通过PROCSQL中ALERT变化字符变量长度。

Q65

ThefollowingSASprogramissubmitted:

dataWORK.ACCOUNTING;

setWORK.DEPARTMENT;

labelJobcode=,JobDescrip.ion';

run;

Whichstatementistrueabouttheoutputdataset?

A.ThelabelofthevariableJobcodeisJob(onlythefirstword).

B.ThelabelofthevariableJobcodeisJobDesc(onlythefirst8characters).

C.ThelabelofthevariableJobcodeisJobDescription.

D.TheprogramfailstoexecuteduetoeiTors.LabelsmustbedefinedinaPROCstep.

答案:C

本题知识点:LABEI标签语句

参照第37题。

Q66

ThefollowingSASprogramissubmitted:

dataWORK.SALES;

doYear=lto5;

doMonth=lto12;

X+1,

end;

end;

inn;

HowmanyobservationsarcwrittentotheWORK.SALESdatasee9

A.0

B.1

C.5

D.60

答案:B

本题知识点:默认的OUTPUT语句

参照第40题。

Q67

Considerthefollowingdatastep:

dataWORK.NEW;

setWORK.OLD(kecp=X);

ifX<10thenX=l;

elseifX>=10ANDXLT20thenX=2;

elseX=3;

run;

InfilteringthevaluesofthevaiiableXindatasetWORK.OLD,whatvaluenewvaluewouldbeassignedto

Xifitsoriginalvaluewasamissingvalue?

A.Xwouldgetavalueof1.

B.Xwouldgetavalueof3.

C.Xwouldretainitsoriginalvalueofmissing.

D.Thisstepdoesnotrunbecauseofsyntaxerrors.

答案:A

本题知识点:缺失值的计算

逻辑计算时按ASCII进行比绞,

缺失值重要是空格(ASCII值为32)

和英文句号(ASCII值为46)o

0-9为48-57

A-Z为65-90

a-z为97-122

Q68

ThefollowingSASprogramissubmitted:

dataWORK.ACCOUNTING;

setWORK.DEPARTMENT;

lengthEmpld$6;

CharEmpid=EmpId;

run;

IfdatasetWORK.DEPARTMENThasanumericvariableEmpld,whichstatementistrueabouttheoutput

dataset?

A.ThetypeofthevariableCharEmpidisnumeric.

B.1hetypeot(hevariableCharEmpidisunknown.

C.ThetypeofthevariableCharEmpidischaracter.

D.Theprogramfailstoexecuteduetoerrors.

答案:D

本题知识点:数据类型的转换、LENTH定义长度

参照第10题。

Q69

GiventhedatasetWORK.EMPDATA:

Employee.Manager_

IDJob_TitleDepartmentID

11DirectorSalesManagement120261

12SalesManagerSalesManagement11

13SalesManagerIISalesManagement11

14AdministrationManagerAdministration11

15SecretaryIAdministration11

Whichoneofthefollowingwherestatementswoulddisplayobservationswithjobtitlescontainingtheword

,Manager"?

A.wheresubstr(Job_Title,(length(Job_Title)-6))="Manager";

B.whereupcase(scan(JobTitle,-1.''))-MANAGER':

C.whereJob_Title="%Manager

D.whereJob_Titlelike*%Managcr%';

答案:D

本题知识点:WHERE语句

WHERE语句与数据集中WHERE选项是在观测读入PDV之前必须满足的一种条件。

WHEREwhere-expression-1<logical-operatorwhere-expression-n>

运算符说明

betweenand选择一定数据范围的观测

ismissing/nul1盘择变量值为缺失值的观测

contain/?近择包括规定字符的观测

Iike匹配选择观测

sameand唐长多种从句

LIKE:下划线表达与一种字符匹配,百分号表达任意的多种字符。

Q70

AfteraSASprogramissubmitted,thefollowingiswrittentotheSASlog:

105dataWORK.JANUARY;

1()6setW()RK.ALLYEAR(keep=ProductMonthQuantityCost);

107ifMonlh='JAN

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论