SASbase考试必备70真题附答案.docx
- 文档编号:5550851
- 上传时间:2022-12-19
- 格式:DOCX
- 页数:53
- 大小:107.78KB
SASbase考试必备70真题附答案.docx
《SASbase考试必备70真题附答案.docx》由会员分享,可在线阅读,更多相关《SASbase考试必备70真题附答案.docx(53页珍藏版)》请在冰豆网上搜索。
SASbase考试必备70真题附答案
SAS-base-考试必备-70真题(附答案)
SAS-base-考试必备-70真题(附答案)
A.infile'customer.txt'1-10;
B.input'customer.txt'stop@10;
C.infile'customer.txt'obs=10;
D.input'customer.txt'stop=10;
Answer:
C
-------------------------------------
6.AfteraSASprogramissubmitted,thefollowingiswrittentotheSASlog:
101dataWORK.JANUARY;
102setWORK.ALLYEAR(keep=productmonthnum_SoldCost);
103ifMonth='Jan'thenoutputWORK.JANUARY;
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
-------------------------------------
7.WhichofthefollowingchoicesisanunacceptableODSdestinationforproducingoutputthatcanbeviewedinMicrosoftExcel?
A.MSOFFICE2K
B.EXCELXP
C.CSVALL
D.WINXP
Answer:
D
-------------------------------------
8.TheSASdatasetnamedWORK.SALARYcontains10observationsforeachdepartment,andiscurrentlyorderedbyDepartment.ThefollowingSASprogramissubmitted:
dataWORK.TOTAL;
setWORK.SALARY(keep=DepartmentMonthlyWageRate);
byDepartment;
ifFirst.Department=1thenPayroll=0;
Payroll+(MonthlyWageRate*12);
ifLast.Department=1;
run;
Whichstatementistrue?
A.ThebystatementintheDATAstepcausesasyntaxerror.
B.ThestatementPayroll+(MonthlyWageRate*12);inthedatastepcausesasyntaxerror.
C.ThevaluesofthevariablePayrollrepresentthemonthlytotalforeachdepartmentintheWORK.SALARYdataset.
D.ThevaluesofthevariablePayrollrepresentamonthlytotalforallvaluesofWAGERATEintheWORK.SALARYdataset.
Answer:
C
-------------------------------------
10.ThefollowingSASprogramissubmitted:
dataWORK.RETAIL;
Cost='$20,000';
Discount=.10*Cost;
run;
Whatistheresult?
A.ThevalueofthevariableDiscountintheoutputdatasetis2000.NomessagesarewrittentotheSASlog.
B.ThevalueofthevariableDiscountintheoutputdatasetis2000.AnotethatconversionhastakenplaceiswrittentotheSASlog.
C.ThevalueofthevariableDiscountintheoutputdatasetismissing.AnoteintheSASlogreferstoinvalidnumericdata.
D.ThevariableDiscountintheoutputdatasetissettozero.NomessagesarewrittentotheSASlog.
Answer:
C因为有一个$符号
-------------------------------------
11.GiventheexistingSASprogram:
procformat;
valueagegrp
low-12='Pre-Teen'
13-high='Teen';
run;
procmeansdata=SASHELP.CLASS;
varHeight;
classSexAge;
formatAgeagegrp.;
run;
Whichstatementintheprocmeansstepneedstobemodifiedoraddedtogeneratethefollowingresults:
AnalysisVariable:
Height
N
SexAgeObsMinimumMaximumMean
------------------------------------------------------------------
FPre-Teen351.359.855.8
Teen656.566.563.0
MPre-Teen457.364.859.7
Teen662.572.066.8
--------------------------------------------------------------------
A.varHeight/nobsminmaxmeanmaxdec=1;
B.procmeansdata=SASHELP.CLASSmaxdec=1;
C.procmeansdata=SASHELP.CLASSminmaxmeanmaxdec=1;
D.outputnobsminmaxmeanmaxdec=1;
Answer:
C
-------------------------------------
12.TheExcelworkbookQTR1.XLScontainsthefollowingthreeworksheets:
JAN
FEB
MAR
WhichstatementcorrectlyassignsalibraryreferencetotheExcelworkbook?
A.libnameqtrdata'qtr1.xls';
B.libname'qtr1.xls'sheets=3;
C.libnamejanfebmar'qtr1.xls';
D.libnamemydata'qtr1.xls'WORK.heets=(jan,feb,mar);
Answer:
A
-------------------------------------
13.ThefollowingSASprogramissubmitted:
dataWORK.TEST;
setWORK.MEASLES(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
-------------------------------------
14.WhichofthefollowingprogramscorrectlyinvokestheDATAStepDebugger:
A.
dataWORK.TESTdebug;
setWORK.PILOTS;
State=scan(cityState,2,'');
ifState='NE'thendescription='Central';
run;
B.
dataWORK.TESTdebugger;
setWORK.PILOTS;
State=scan(cityState,2,'');
ifState='NE'thendescription='Central';
run;
C.
dataWORK.TEST/debug;
setWORK.PILOTS;
State=scan(cityState,2,'');
ifState='NE'thendescription='Central';
run;
D.
dataWORK.TEST/debugger;
setWORK.PILOTS;
State=scan(cityState,2,'');
ifState='NE'thendescription='Central';
run;
Answer:
c
-------------------------------------
15.WhichstatementistrueconcerningtheSASautomaticvariable_ERROR_?
A.Itcannotbeusedinanif/thencondition.
B.Itcannotbeusedinanassignmentstatement.
C.Itcanbeputintoakeepstatementorkeep=option.
D.Itisautomaticallydropped.
Answer:
D
-------------------------------------
16.ThefollowingSASprogramissubmitted:
dataWORK.DATE_INFO;
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
-------------------------------------
17.Giventhefollowingdatastep:
dataWORK.GEO;
infiledatalines;
inputCity$20.;
ifCity='Tulsa'then
State='OK';
Region='Central';
ifCity='LosAngeles'then
State='CA';
Region='Western';
datalines;
Tulsa
LosAngeles
Bangor
;
run;
Afterdatastepexecution,whatwilldatasetWORK.GEOcontain?
A.
CityStateRegion
-----------------------
TulsaOKWestern
LosAngelesCAWestern
BangorWestern
B.
CityStateRegion
-----------------------
TulsaOKWestern
LosAngelesCAWestern
Bangor
C.
CityStateRegion
-----------------------
TulsaOKCentral
LosAngelesCAWestern
BangorWestern
D.
CityStateRegion
-----------------------
TulsaOKCentral
LosCAWestern
Bangor
Answer:
A
-------------------------------------
18.WhichstatementdescribesacharacteristicoftheSASautomaticvariable_ERROR_?
A.The_ERROR_variablemaintainsacountofthenumberofdataerrorsinaDATAstep.
B.The_ERROR_variableisaddedtotheprogramdatavectorandbecomespartofthedatasetbeingcreated.
C.The_ERROR_variablecanbeusedinexpressionsintheDATAstep.
D.The_ERROR_variablecontainsthenumberoftheobservationthatcausedthedataerror.
Answer:
C
-------------------------------------
19.TheSASdatasetWORK.ONEcontainsanumericvariablenamedNumandacharactervariablenamedChar:
WORK.ONE
NumChar
-------
123
323
177
ThefollowingSASprogramissubmitted:
procprintdata=WORK.ONE;
whereNum='1';
run;
Whatisoutput?
A.
NumChar
-------
123
B.
NumChar
-------
123
177
C.
NumChar
-------
123
323
177
D.Nooutputisgenerated.
Answer:
D
-------------------------------------
20.ThedatasetWORK.REALESTATEhasthevariableLocalFeewithaformatof9.andavariableCountryFeewithaformatof7.;
ThefollowingSASprogramissubmitted:
dataWORK.FEE_STRUCTURE;
formatLocalFeeCountryFeepercent7.2;
setWORK.REALESTAT;
LocalFee=LocalFee/100;
CountryFee=CountryFee/100;
run;
WhataretheformatsofthevariablesLOCALFEEandCOUNTRYFEEintheoutputdataset?
A.LocalFeehasformatof9.andCountryFeehasaformatof7.
B.LocalFeehasformatof9.andCountryFeehasaformatofpercent7.2
C.BothLocalFeeandCountryFeehaveaformatofpercent7.2
D.Thedatastepfailsexecution;thereisnoformatforLocalFee.
Answer:
C
-------------------------------------
21.GiventheSASdatasetWORK.PRODUCTS:
ProdIdPriceProductTypeSalesReturns
----------------------------------
K12S95.50OUTDOOR152
B132S2.99CLOTHING30010
R18KY251.99EQUIPMENT255
3KL8BY6.39OUTDOOR12515
DY65DW5.60OUTDOOR455
DGTY2334.55EQUIPMENT672
ThefollowingSASprogramissubmitted:
dataWORK.OUTDOORWORK.CLOTHWORK.EQUIP;
setWORK.PRODUCTS;
ifSalesGT30;
ifProductTypeEQ'OUTDOOR'thenoutputWORK.OUTDOOR;
elseifProductTypeEQ'CLOTHING'thenoutputWORK.CLOTH;
elseifProductTypeEQ'EQUIPMENT'thenoutputWORK.EQUIP;
run;
HowmanyobservationsdoestheWORK.OUTDOORdatasetcontain?
A.1
B.2
C.3
D.6
Answer:
B
-------------------------------------
22.WhichstepdisplaysalistingofallthedatasetsintheWORKlibrary?
A.proccontentslib=WORKrun;
B.proccontentslib=WORK.all;run;
C.proccontentsdata=WORK._all_;run;
D.proccontentsdata=WORK_ALL_;run;
Answer:
c
-------------------------------------
23.WhichisavalidLIBNAMEstatement?
A.libname"_SAS_data_library_location_";
B.sasdatalibname"_SAS_data_library_location_";
C.libnamesasdata"_SAS_data_library_location_";
D.libnamesasdatasas"_SAS_data_library_location_";
Answer:
C
-------------------------------------
24.Giventhefollowingrawdatarecords:
----|----10---|----20---|----30
Susan*12/29/1970*10
Michael**6
Thef
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- SASbase 考试 必备 70 真题附 答案