SAS认证考试(官方练习题集和校正答案).doc

上传人:聆听****声音 文档编号:783850 上传时间:2023-04-30 格式:DOC 页数:40 大小:638.50KB
下载 相关 举报
SAS认证考试(官方练习题集和校正答案).doc_第1页
第1页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第2页
第2页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第3页
第3页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第4页
第4页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第5页
第5页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第6页
第6页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第7页
第7页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第8页
第8页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第9页
第9页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第10页
第10页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第11页
第11页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第12页
第12页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第13页
第13页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第14页
第14页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第15页
第15页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第16页
第16页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第17页
第17页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第18页
第18页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第19页
第19页 / 共40页
SAS认证考试(官方练习题集和校正答案).doc_第20页
第20页 / 共40页
亲,该文档总共40页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

SAS认证考试(官方练习题集和校正答案).doc

《SAS认证考试(官方练习题集和校正答案).doc》由会员分享,可在线阅读,更多相关《SAS认证考试(官方练习题集和校正答案).doc(40页珍藏版)》请在冰点文库上搜索。

SAS认证考试(官方练习题集和校正答案).doc

1.  

Arawdatafileislistedbelow.

1---+----10---+----20---+---

son Frank01/31/89

daughterJune   12-25-87 

brotherSamuel01/17/51

Thefollowingprogramissubmittedusingthisfileasinput:

datawork.family;

infile'file-specification';

run;

WhichINPUTstatementcorrectlyreadsthevaluesforthevariableBirthdateasSASdatevalues?

a.

inputrelation$first_name$birthdatedate9.;

b.

inputrelation$first_name$birthdatemmddyy8.;

c.

inputrelation$first_name$birthdate:

date9.;

d.

inputrelation$first_name$birthdate:

mmddyy8.;

Correct answer:

  d

AninformatisusedtotranslatethecalendardatetoaSASdatevalue.Thedatevaluesareintheformoftwo-digitvaluesformonth-day-year,sotheMMDDYY8.informatmustbeused.Whenusinganinformatwithlistinput,thecolon-formatmodifierisrequiredtocorrectlyassociatetheinformatwiththevariablename.

Youcanlearnabout

·informatsinReadingDateandTimeValues

·thecolon-formatmodifierinReadingFree-FormatData.

 

2.  

Arawdatafileislistedbelow.

1---+----10---+----20---+---

Jose,47,210

Sue,,108

ThefollowingSASprogramissubmittedusingtherawdatafileaboveasinput:

dataemployeestats;

inputname$ageweight;

run;

Thefollowingoutputisdesired:

name

age

weight

Jose

47

210

Sue

.

108

WhichofthefollowingINFILEstatementscompletestheprogramandaccessesthedatacorrectly?

a.

infile'file-specification'pad;

b.

infile'file-specification'dsd;

c.

infile'file-specification'dlm=',';

d.

infile'file-specification'missover;

Correct answer:

  b

ThePADoptionspecifiesthatSASpadvariablelengthrecordswithblanks.TheMISSOVERoptionpreventsSASfromreadingpasttheendofthelinewhenreadingfreeformatteddata.TheDLM=optionspecifiesthecommaasthedelimiter;however,consecutivedelimitersaretreatedasonebydefault.TheDSDoptioncorrectlyreadsthedatawithcommasasdelimitersandtwoconsecutivecommasindicatingamissingvaluelikethoseinthisrawdatafile.

Youcanlearnabout

·thePADoptioninReadingRawDatainFixedFields

·theMISSOVERoptioninCreatingMultipleObservationsfromaSingleRecord

·theDLM=optionandtheDSDoptioninReadingFree-FormatData.

 

3.  

Thefollowingprogramissubmitted:

datanumrecords;

infilecardsdlm=',';

inputagent1$agent2$agent3$;

cards;

jones,,brownjones,spencer,brown

;

run;

WhatisthevalueforthevariablenamedAgent2inthesecondobservation?

a.

Brown

b.

Spencer

c.

''(missingcharactervalue)

d.

Thereisnovaluebecauseonlyoneobservationiscreated.

Correct answer:

  d

TheCARDSstatementenablesyoutoreadinstreamdata.AnynumberofconsecutivecommasareconsideredtobeasingledelimiterasaresultoftheDLM=option,andthelengthofeachvariabledefaultsto8bytes.Therefore,thevaluesjones,brownjon,andspencerareassignedtoAgent1,Agent2,andAgent3,respectively,forthefirstobservation.TherestofthedataontherecordisnotreadbytheINPUTstatementandisnotoutputtothedataset.

Youcanlearnabout

·theCARDSstatementinCreatingSASDataSetsfromRawData

·thedefaultlengthofvariablesinReadingFree-FormatData.

 

4.  

Arawdatafileislistedbelow.

1---+----10---+----20---+----30---+----40---+----50

TWOSTORY10402      1SANDERSROAD      $55,850

CONDO    21504    2.5JEANSAVENUE     $127,150

Thefollowingprogramissubmittedusingthisfileasinput:

datawork.houses;

infile'file-specification';

run;

WhichoneofthefollowingINPUTstatementsreadstherawdatafilecorrectly?

a.

input@1style$8.

+1sqfeet4.

+1bedrooms1.

@20baths3.

street16.

@40pricedollar8;

b.

input@1style$8

+1sqfeet4.

+1bedrooms1.

@20baths3.

street$16

@40pricedollar8.;

c.

input@1style$8.

+1sqfeet4.

+1bedrooms1.

@20baths3.

street$16.

@40pricedollar8.;

d.

input@1style$8.

+1sqfeet4.

+1bedrooms1.

@20baths3

street16.

@40pricedollar8.;

Correct answer:

  c

Formattedinputrequiresperiodsaspartoftheinformatname.TheperiodismissingfromthevariablesStyleandStreetinAnswerb,thevariableBathsinAnswerd,andthevariablePriceinAnswera(whichisalsomissingadollarsigntoreadthevariableStreetasacharactervalue).

YoucanlearnaboutformattedinputandinformatsinReadingRawDatainFixedFields.

 

5.  

ThefollowingSASprogramissubmittedatthestartofanewSASsession:

libnamesasdata'SAS-data-library';

datasasdata.sales;

setsasdata.salesdata;

profit=expenses-revenues;

run;

procprintdata=sales;

run;

TheSASdatasetSasdata.Salesdatahastenobservations.Whichoneofthefollowingexplainswhyareportfailstogenerate?

a.

TheDATAstepfailsexecution.

b.

TheSASdatasetSalesdoesnotexist.

c.

TheSASdatasetSaleshasnoobservations.

d.

ThePRINTprocedurecontainsasyntaxerror.

Correct answer:

  b

TheDATAstepcreatesapermanentSASdataset,Sasdata.Salesdata.ThePRINTprocedureisprintingatemporarySASdataset,Sales,thatisstoredintheWorklibrary.AtthebeginningoftheSASsession,Work.Salesdoesnotexist.

Youcanlearnabout

·creatingpermanentdatasetswiththeDATAstepinCreatingSASDataSetsfromRawData

·temporarydatasetsinBasicConcepts.

 

6.  

WhichactionassignsareferencenamedSALEStoapermanentSASdatalibrary?

a.

Issuingthecommand:

librefSALES'SAS-data-library'

b.

Issuingthecommand:

libnameSALES'SAS-data-library'

c.

Submittingthestatement:

librefSALES'SAS-data-library';

d.

Submittingthestatement:

libnameSALES'SAS-data-library';

Correct answer:

  d

TheLIBNAMEstatementassignsareferenceknownasalibreftoapermanentSASdatalibrary.TheLIBNAMEcommandopenstheLIBNAMEwindow.

YoucanlearnabouttheLIBNAMEstatementinReferencingFilesandSettingOptions.

 

7.  

ThefollowingSASprogramissubmitted:

datanewstaff;

setstaff;

run;

WhichoneofthefollowingWHEREstatementscompletestheprogramandselectsonlyobservationswithaHire_dateofFebruary23,2000?

a.

wherehire_date='23feb2000'd;

b.

wherehire_date='23feb2000';

c.

wherehire_date='02/23/2000'd;

d.

wherehire_date='02/23/2000';

Correct answer:

  a

ASASdateconstantmusttaketheformofone-ortwo-digitday,three-digitmonth,andtwo-orfour-digityear,enclosedinquotationmarksandfollowedbyad('ddmmmyy'd).

YoucanlearnaboutSASdateconstantsinCreatingSASDataSetsfromRawData.

 

8.  

WhichoneofthefollowingSASdateformatsdisplaystheSASdatevalueforJanuary16,2002intheformof16/01/2002?

a.

DATE10.

b.

DDMMYY10.

c.

WEEKDATE10.

d.

DDMMYYYY10.

Correct answer:

  b

Therequestedoutputisinday-month-yearorderandis10byteslong,soDDMMYY10.isthecorrectformat.AlthoughWEEKDATE10.isavalidSASformat,itdoesnotdisplaytheSASdatevalueasshowninthequestionabove.DDMMYYYY10.isnotavalidSASdateformat,andtheDATEw.formatcannotacceptalengthof10.

Youcanlearnabout

·theDDMMYY10.formatinCreatingListReports

·theWEEKDATE10.formatinReadingDateandTimeValues.

 

9.  

WhichoneofthefollowingdisplaysthecontentsofanexternalfilefromwithinaSASsession?

a.

theLISTprocedure

b.

thePRINTprocedure

c.

theFSLISTprocedure

d.

theVIEWTABLEwindow

Correct answer:

  c

ThePRINTprocedureandVIEWTABLEwindowdisplaythevaluesinSASdatasets.TheFSLISTproceduredisplaysthevaluesinexternalfiles.ThereisnoLISTprocedureinSAS.

Youcanlearnabout

·thePRINTprocedureinCreatingListReports

·theVIEWTABLEwindowinReferencingFilesandSettingOptions.

 

10.  

TheSASdatasetSashelp.PrdsalecontainsthevariablesRegionandSalarywith4observationsperRegion.Sashelp.PrdsaleissortedprimarilybyRegionandwithinRegionbySalaryindescendingorder.

Thefollowingprogramissubmitted:

dataone;

setsashelp.prdsale;

retaintemp;

byregiondescendingsalary;

iffirst.regionthen

do;

temp=salary;

output;

end;

iflast.regionthen

do;

range=salary-temp;

output;

end;

run;

Foreachregion,whatisthenumberofobservation(s)writtentotheoutputdataset?

a.

0

b.

1

c.

2

d.

4

Correct answer:

  c

Theexpressionfirst.regionistrueonceforeachregiongroup.Theexpressionlast.regionistrueonceforeachregiongroup.Therefore,eachOUTPUTstatementexecutesonceforatotalof2observationsintheoutputdataset.

YoucanlearnabouttheFIRST.variableexpressionandtheOUTPUTstatementinReadingSASDataSets.

 

11.  

ThefollowingSASprogramissubmitted:

proccontentsdata=sasuser.houses;

run;

TheexhibitbelowcontainspartialoutputproducedbytheCONTENTSprocedure.

DataSetName

SASUSER.HOUSES

Observations

15

MemberType

DATA

Variables

6

Engine

V9

Indexes

0

Created

Tuesday,April22,

200303:

09:

25PM

ObservationLength

56

LastModified

Tuesday,April22,

200303:

09:

25PM

DeletedObservations

0

Protection

 

Compressed

NO

DataSetType

 

Sorted

NO

Label

Residentialhousing

forsale

 

 

DataRepresentation

WINDOWS_32

 

 

Encoding

wlatin1Weste

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

当前位置:首页 > IT计算机 > 电脑基础知识

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2