SASbase考试必备70真题.docx

上传人:b****8 文档编号:9783412 上传时间:2023-02-06 格式:DOCX 页数:64 大小:27.72KB
下载 相关 举报
SASbase考试必备70真题.docx_第1页
第1页 / 共64页
SASbase考试必备70真题.docx_第2页
第2页 / 共64页
SASbase考试必备70真题.docx_第3页
第3页 / 共64页
SASbase考试必备70真题.docx_第4页
第4页 / 共64页
SASbase考试必备70真题.docx_第5页
第5页 / 共64页
点击查看更多>>
下载资源
资源描述

SASbase考试必备70真题.docx

《SASbase考试必备70真题.docx》由会员分享,可在线阅读,更多相关《SASbase考试必备70真题.docx(64页珍藏版)》请在冰豆网上搜索。

SASbase考试必备70真题.docx

SASbase考试必备70真题

followingSASprogramissubmitted:

data;

set;

byDepartmentGender;

ifFirst.<_insert_code_>thenPayroll=0;

Payroll+Wagerate;

ifLast.<_insert_code_>;

run;

TheSASdatasetiscurrentlyorderedbyGenderwithinDepartment.

WhichinsertedcodewillaccumulatesubtotalsforeachGenderwithinDepartment?

A.Gender

B.Department

C.GenderDepartment

D.DepartmentGender

Answer:

A

-------------------------------------

thefollowingrawdatarecordsin:

----|----10---|----20---|----30

John,FEB,13,25,14,27,Final

John,MAR,26,17,29,11,23,Current

Tina,FEB,15,18,12,13,Final

Tina,MAR,29,14,19,27,20,Current

Thefollowingoutputisdesired:

ObsNameMonthStatusWeek1Week2Week3Week4Week5

1JohnFEBFinal$13$25$14$27.

2JohnMARCurrent$26$17$29$11$23

3TinaFEBFinal$15$18$12$13.

4TinaMARCurrent$29$14$19$27$20

WhichSASprogramcorrectlyproducesthedesiredoutput?

A.

data;

lengthName$4Month$3Status$7;

infile''dsd;

inputName$Month$;

ifMonth='FEB'theninputWeek1Week2Week3Week4Status$;

elseifMonth='MAR'theninputWeek1Week2Week3Week4Week5Status$;

formatWeek1-Week5dollar6.;

run;

procprintdata=;

run;

B.

data;

lengthName$4Month$3Status$7;

infile''dlm=','missover;

inputName$Month$;

ifMonth='FEB'theninputWeek1Week2Week3Week4Status$;

elseifMonth='MAR'theninputWeek1Week2Week3Week4Week5Status$;

formatWeek1-Week5dollar6.;

run;

procprintdata=;

run;

C.

data;

lengthName$4Month$3Status$7;

infile''dlm=',';

inputName$Month$@;

ifMonth='FEB'theninputWeek1Week2Week3Week4Status$;

elseifMonth='MAR'theninputWeek1Week2Week3Week4Week5Status$;

formatWeek1-Week5dollar6.;

run;

procprintdata=;

run;

D.

data;

lengthName$4Month$3Status$7;

infile''dsd@;

inputName$Month$;

ifMonth='FEB'theninputWeek1Week2Week3Week4Status$;

elseifMonth='MAR'theninputWeek1Week2Week3Week4Week5Status$;

formatWeek1-Week5dollar6.;

run;

procprintdata=;

run;

Answer:

C

-------------------------------------

Excelworkbookcontainsthefollowingfourworksheets:

EAST

WEST

NORTH

SOUTH

Thefollowingprogramissubmitted:

libnameMYXLS'';

WhichPROCPRINTstepcorrectlydisplaystheNORTHworksheet?

A.procprintdata=;run;

B.procprintdata=$;run;

C.procprintdata=MYXLS.'NORTH'e;run;

D.procprintdata=MYXLS.'NORTH$'n;run;

Answer:

D

-------------------------------------

followingSASprogramissubmitted:

data;

Day="01";

Yr=1960;

X=mdy(Day,01,Yr);

run;

WhatisthevalueofthevariableX?

A.thenumericvalue0

B.thecharactervalue"01011960"

C.amissingvalueduetosyntaxerrors

D.thestepwillnotcompilebecauseofthecharacterargumentinthemdyfunction.

Answer:

A

-------------------------------------

statementspecifiesthatrecords1through10aretobereadfromtherawdatafile?

A.infile''1-10;

B.input''stop@10;

C.infile''obs=10;

D.input''stop=10;

Answer:

C

-------------------------------------

aSASprogramissubmitted,thefollowingiswrittentotheSASlog:

101data;

102set(keep=productmonthnum_SoldCost);

103ifMonth='Jan'thenoutput;

104Sales=Cost*Num_Sold;

105keep=ProductSales;

-----

22

ERROR22-322:

Syntaxerror,expectingoneofthefollowing:

!

!

!

&,*,**,+,-,,<=,<>,=,>,>=,

AND,EQ,GE,GT,IN,LE,LT,MAX,MIN,NE,NG,NL,NOTIN,OR,^=,|,||,~=.

106run;

WhatchangesshouldbemadetotheKEEPstatementtocorrecttheerrorsintheLOG?

A.keep=(ProductSales);

B.keepProduct,Sales;

C.keep=Product,Sales;

D.keepProductSales;

Answer:

D

-------------------------------------

ofthefollowingchoicesisanunacceptableODSdestinationforproducingoutputthatcanbeviewedinMicrosoftExcel?

A.MSOFFICE2K

B.EXCELXP

C.CSVALL

D.WINXP

Answer:

D

-------------------------------------

SASdatasetnamedcontains10observationsforeachdepartment,andiscurrentlyorderedbyDepartment.ThefollowingSASprogramissubmitted:

data;

set(keep=DepartmentMonthlyWageRate);

byDepartment;

if=1thenPayroll=0;

Payroll+(MonthlyWageRate*12);

if=1;

run;

Whichstatementistrue?

A.ThebystatementintheDATAstepcausesasyntaxerror.

B.ThestatementPayroll+(MonthlyWageRate*12);inthedatastepcausesasyntaxerror.

C.ThevaluesofthevariablePayrollrepresentthemonthlytotalforeachdepartmentinthedataset.

D.ThevaluesofthevariablePayrollrepresentamonthlytotalforallvaluesofWAGERATEinthedataset.

Answer:

C

-------------------------------------

followingSASprogramissubmitted:

data;

Cost='$20,000';

Discount=.10*Cost;

run;

Whatistheresult?

A.ThevalueofthevariableDiscountintheoutputdatasetismessagesarewrittentotheSASlog.

B.ThevalueofthevariableDiscountintheoutputdatasetisnotethatconversionhastakenplaceiswrittentotheSASlog.

C.ThevalueofthevariableDiscountintheoutputdatasetismissing.AnoteintheSASlogreferstoinvalidnumericdata.

D.ThevariableDiscountintheoutputdatasetissettomessagesarewrittentotheSASlog.

Answer:

C因为有一个$符号

-------------------------------------

theexistingSASprogram:

procformat;

valueagegrp

low-12='Pre-Teen'

13-high='Teen';

run;

procmeansdata=;

varHeight;

classSexAge;

formatAgeagegrp.;

run;

Whichstatementintheprocmeansstepneedstobemodifiedoraddedtogeneratethefollowingresults:

AnalysisVariable:

Height

N

SexAgeObsMinimumMaximumMean

------------------------------------------------------------------

FPre-Teen3

Teen6

MPre-Teen4

Teen6

--------------------------------------------------------------------

 

A.varHeight/nobsminmaxmeanmaxdec=1;

B.procmeansdata=maxdec=1;

C.procmeansdata=minmaxmeanmaxdec=1;

D.outputnobsminmaxmeanmaxdec=1;

Answer:

C

-------------------------------------

Excelworkbookcontainsthefollowingthreeworksheets:

JAN

FEB

MAR

WhichstatementcorrectlyassignsalibraryreferencetotheExcelworkbook?

A.libnameqtrdata'';

B.libname''sheets=3;

C.libnamejanfebmar'';

D.libnamemydata''=(jan,feb,mar);

Answer:

A

-------------------------------------

followingSASprogramissubmitted:

data;

set(keep=JanptFebptMarpt);

arrayDiff{3}Difcount1-Difcount3;

arrayPatients{3}JanptFebptMarpt;

run;

Whatnewvariablesarecreated?

A.Difcount1,Difcount2andDifcount3

B.Diff1,Diff2andDiff3

C.Janpt,Febpt,andMarpt

D.Patients1,Patients2andPatients3

Answer:

A

-------------------------------------

ofthefollowingprogramscorrectlyinvokestheDATAStepDebugger:

A.

datadebug;

set;

State=scan(cityState,2,'');

ifState='NE'thendescription='Central';

run;

B.

datadebugger;

set;

State=scan(cityState,2,'');

ifState='NE'thendescription='Central';

run;

C.

data/debug;

set;

State=scan(cityState,2,'');

ifState='NE'thendescription='Central';

run;

D.

data/debugger;

set;

State=scan(cityState,2,'');

ifState='NE'thendescription='Central';

run;

Answer:

c

-------------------------------------

statementistrueconcerningtheSASautomaticvariable_ERROR_?

A.Itcannotbeusedinanif/thencondition.

B.Itcannotbeusedinanassignmentstatement.

C.Itcanbeputintoakeepstatementorkeep=option.

D.Itisautomaticallydropped.

Answer:

D

-------------------------------------

followingSASprogramissubmitted:

data;

X='04jul2005'd;

DayOfMonth=day(x);

MonthOfYear=month(x);

Year=year(x);

run;

WhattypesofvariablesareDayOfMonth,MonthOfYear,andYear?

A.DayOfMonth,Year,andMonthOfYeararecharacter.

B.DayOfMonth,Year,andMonthOfYeararenumeric.

C.DayOfMonthandYeararenumeric.MonthOfYearischaracter.

D.DayOfMonth,Year,andMonthOfYeararedatevalues.

Answer:

B

-------------------------------------

thefollowingdatastep:

data;

infiledatalines;

inputCity$20.;

ifCity='Tulsa'then

State='OK';

Region='Central';

ifCity='LosAngeles'then

State='CA';

Region='Western';

datalines;

Tulsa

LosAngeles

Bangor

;

run;

Afterdatastepexecution,whatwilldatasetcontain?

 

A.

CityStateRegion

-----------------------

TulsaOKWestern

LosAngelesCAWestern

BangorWestern

B.

CityStateRegion

-----------------------

TulsaOKWestern

LosAngelesCAWestern

Bangor

C.

CityStateRegion

-----------------------

TulsaOKCentral

LosAngelesCAWestern

BangorWestern

D.

CityStateRegion

-----------------------

TulsaOKCentral

LosCAWestern

Bangor

Answer:

A

-------------------------------------

statementdescribesacharacteristicoftheSASautomaticvariable_ERROR_?

A.The_ERROR_variablemaintainsacountofthenumberofdataerrorsinaDATAstep.

B.The_ERROR_variableisaddedtotheprogramdatavectorandbecomespartofthedatasetbeingcreated.

C.The_ERROR_variablecanbeusedinexpressionsintheDATAstep.

D.The_ERROR_variablecontainsthenumberoftheobservationthatcausedthedataerror.

Answer:

C

-------------------------------------

SASdatasetcontainsanumericvariablenamedNumandacharactervariablenamedChar:

NumChar

-------

123

323

177

ThefollowingSASprogramissubmitted:

procprintdata

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

当前位置:首页 > 求职职场 > 简历

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

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