版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- GB/T 13961-2026灯具用电源导轨系统
- 消防安全隐患拆除通知
- 安全生产年限证明讲解
- 超市消防安全现状分析
- 社区团长招募与活跃提升工具包邀约分工激励
- 2026年10月自考14616园林植物应用设计(江苏)押题及答案
- 公司印信管理规定
- 法律职业资格客观题真题汇编冲刺(解析版)
- 关于年度销售指标完成情况确认函(4篇)
- 办公室装修合同确认函模板(3篇范文)
- 2026年新教材八年级上册历史全册必背知识点考点提纲
- 2026年湖北专升本汉语言文学专业(现代汉语中国古代文学)题库附答案
- 2026年四川省拟任县处级领导干部理论(任职资格考试)全真模拟试题及答案
- SD22推土机使用说明书完整版
- 2026潍坊第二人民医院招聘(3人)建设笔试备考试题及答案解析
- 湖北省荆州市松滋市2025-2026学年上学期八年级物理期末试题(含答案)
- 社区食堂规范运营制度范本
- 2026年深圳市离婚协议书规范范本
- GB/T 21873-2025橡胶密封件给、排水管及污水管道用接口密封圈材料规范
- 神经内科疾病康复与治疗
- 公共资源交易数据的价值与应用分析
评论
0/150
提交评论