版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
SASBase认证考试—70题(51-60)Q51Thefollowingprogramissubmitted:
proccontentsdata=_all_;
run;Whichstatementbestdescribestheoutputfromthesubmittedprogram?A.TheoutputcontainsonlyalistoftheSASdatasetsthatarecontainedintheWORKlibrary.B.TheoutputdisplaysonlythecontentsoftheSASdatasetsthatarecontainedintheWORKlibrary.C.TheoutputdisplaysonlythevariablesintheSASdatasetsthatarecontainedintheWORKlibrary.D.TheoutputcontainsalistoftheSASdatasetsthatarecontainedintheWORKlibraryanddisplaysthecontentsofthosedatasets.答案:D
本题知识点:PROCCOTENTS过程参考第22题。
Q52GiventheSASdatasetWORK.EMP_NAME:
Name
EmpID
Jill
1864
Jack
2121
Joan
4698
John
5463GiventheSASdatasetWORK.EMP_DEPT:
EmpID
Department
2121
Accounting
3567
Finance
4698
Marketing
5463
AccountingThefollowingprogramissubmitted:
dataWORK.ALL;
mergeWORK.EMP_NAME(in=Emp_N)
WORK.EMP_DEPT(in=Emp_D);
byEmpid;
if(Emp_NandnotEmp_D)or(Emp_DandnotEmp_N);
run;HowmanyobservationsareindatasetWORK.ALLaftersubmittingtheprogram?A.1B.2C.3D.5答案:B
本题知识点:MERGE合并数据集、IF子集找出两个数据集中不重合的观测个数。
Q53ThefollowingSASprogramissubmitted:
dataWORK.TOTAL_SALARY;
retainTotal;
setWORK.SALARY;
byDepartment;
ifFirst.Department
thenTotal=0;
Total=sum(Total,Wagerate);
ifLast.Total;
run;WhatistheinitialvalueofthevariableTotal?A.0B.MissingC.ThevalueofthefirstobservationsWagerateD.Cannotbedeterminedfromtheinformationgiven答案:B
本题知识点: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;
Q54Considerthefollowingdatastep:
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.答案:D本题知识点:RETAIN语句一般,SAS每读一遍DATA步的所有语句,PDV清空所有所有变量值,并设立为缺失值。再执行INPUT语句或赋值语句,再次对变量赋值。假如在DATA步中使用RETAIN语句,不会清空RETAIN相应的变量,保存到该变量下次再次被执行。
Q55ThefollowingSASprogramissubmitted:
dataWORK.DATE_INFO;
X="01Jan1960"D;
run;VariableXcontainswhatvalue?A.thenumericvalue0B.thecharactervalue"01Jan1960"C.thedatevalue01011960D.thecodecontainsasyntaxerroranddoesnotexecute.答案:D本题知识点:日期时间的表达格式起点:1960年1月1日0时0分0秒。若将日期时间标示为数值型常数,需使用相应格式。格式值带单引号,后紧跟跟一个D(日期)、T(时间)、DT(日期时间)。在表达为数值常数时,不支持MMDDYYw.格式,支持datew.格式。本题,答案C,是由于X="01Jan1960"D;中D之前有个空格。若改为X="01Jan1960"D;,答案就是A。若改为X="01011960"D;,答案就是D。
Q56ThefollowingoutputiscreatedbytheFREQUENCYprocedure:
TheFREQProcedure
Tableofregionbyproduct
region
product
Frequency|
Percent
|
RowPct
|
ColPct
|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.00WhichTABLESstatementwasusedtocompletedthefollowingprogramthatproducedtheoutput?
procfreqdata=sales;
<_insert_code_>
run;A.tablesregionproduct;B.tablesregion,productC.tablesregion/product;D.tablesregion*product;答案:D
本题知识点:PROCFREQ过程参考第47题。
Q57GiventheSASdatasetWORK.ONE:
N
BeginDate
-
1
09JAN2023
2
12JAN2023ThefollowingSASprogramissubmitted:
dataWORK.TWO;
setWORK.ONE;
Day=<_insert_code_>;
formatBeginDatedate9.;
run;ThedatasetWORK.TWOiscreated,whereDaywouldbe1forSunday,2forMonday,3forTuesday,...:
WORK.TWO
N
BeginDate
Day
-
1
09JAN2023
1
2
12JAN2023
4WhichexpressionsuccessfullycompletedtheprogramandcreatesthevariableDay?A.day(BeginDate)B.weekday(BeginDate)C.dayofweek(BeginDate)D.getday(BeginDate,today())答案:B
本题知识点:日期时间函数WEEKDAY(date)返回SAS日期值为一周的第几天
Q58Thefollowingprogramissubmitted:
procformat;
valuesalfmt.
0-<50000
='Lessthan50K'
50000-high='50KorGreater';
optionsfmterrnodatepageno=1;
title'EmployeeReport';
procprintdata=work.employeesnoobs;
varfullnamesalaryhiredate;
format
salarysalfmt.
hiredatedate9.;
label
fullname='NameofEmployee'
salary='AnnualSalary'
hiredate='DateofHire';
run;Whydoestheprogramfail?A.ThePAGENOoptionisinvalidintheOPTIONSstatement.B.TheRUNstatementismissingaftertheFORMATprocedure.C.TheformatnamecontainsaperiodintheVALUEstatement.D.TheLABELoptionismissingfromthePROCPRINTstatement.答案:C
本题知识点:FORMAT语句、PROCFORMAT过程参考第9题。
Q59GiventhecontentsoftherawdatafileTYPECOLOR.DAT:
+10+20+30
daisyyellowThefollowingSASprogramissubmitted:
dataFLOWERS;
infile'TYPECOLOR.DAT'truncover;
length
Type$5
Color$11;
input
Type$
Color$;
run;WhatarethevaluesofthevariablesTypeandColor?A.Type=daisy,Color=yellowB.Type=daisy,Color=wC.Type=daisy,Color=daisyyellowD.Type=daisy,Color=答案:D
本题知识点:INFILE语句参考第5题。
Q60GiventheSASdatasetWORK.PRODUCTS:
ProdId
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 某食品厂微生物检测细则
- 2026年-2027四川凉山州西昌市农业农村局招聘特聘动物防疫员8人笔试参考题库及答案解析
- 2026广西合高工程有限公司下半年社会招聘1人笔试模拟试题及答案解析
- 2026威海市三甲公立医院外包岗位工作人员招聘笔试参考题库及答案解析
- 2026年江苏省南通市公务员人员招聘笔试参考题库与答案详解
- 2027中国人民银行招聘考试参考题库及答案解析
- 2027中国科学院理化技术研究所招聘考试模拟试题及答案解析
- 机械制造安全生产准则
- 都江堰市人力资源和社会保障局公开招聘机关事业单位编外人员(13人)笔试备考题库及答案解析
- 2026年北京市昌平区事业单位人员招聘笔试备考题库与答案详解
- 2026年高危孕产妇培训模拟试题(含答案)
- 财务会计-新修订版财务报表模板-财会2026-11号
- 2026年水利工程安全生产A证考试题库
- 2026年家庭医生签约培训考试试题(附答案)
- 2026年经济师(中级)考试真题及答案
- 《打造非遗文化视觉盛宴-网站的制作与美化》教学设计-2026-2027学年粤教版(新版)初中信息科技七年级全一册
- 267道英文字母专项测试题(含详细答案)
- 中国联通春季校园招聘笔试真题及试题及答案
- 2026年国家工作人员学法用法考试题库附参考答案
- 第9课 特殊关爱 助我成长 第2课时 课件(内嵌视频)2026-2027学年道德与法治六年级上册统编版
- 工厂化学品火灾应急演练脚本
评论
0/150
提交评论