下载

2下载券

加入VIP
  • 专属下载特权
  • 现金文档折扣购买
  • VIP免费专区
  • 千万文档免费下载

上传资料

关闭

关闭

关闭

封号提示

内容

首页 SAS base题70真题附答案

SAS base题70真题附答案.doc

SAS base题70真题附答案

lllyyy
2018-09-10 0人阅读 举报 0 0 暂无简介

简介:本文档为《SAS base题70真题附答案doc》,可适用于职业教育领域

ThefollowingSASprogramissubmitted:dataWORKTOTALsetWORKSALARYbyDepartmentGenderifFirst<insertcode>thenPayroll=PayrollWagerateifLast<insertcode>runTheSASdatasetWORKSALARYiscurrentlyorderedbyGenderwithinDepartmentWhichinsertedcodewillaccumulatesubtotalsforeachGenderwithinDepartmentAGenderBDepartmentCGenderDepartmentDDepartmentGenderAnswer:AGiventhefollowingrawdatarecordsinTEXTFILETXT:|||John,FEB,,,,,FinalJohn,MAR,,,,,,CurrentTina,FEB,,,,,FinalTina,MAR,,,,,,CurrentThefollowingoutputisdesired:ObsNameMonthStatusWeekWeekWeekWeekWeekJohnFEBFinal$$$$JohnMARCurrent$$$$$TinaFEBFinal$$$$TinaMARCurrent$$$$$WhichSASprogramcorrectlyproducesthedesiredoutputAdataWORKNUMBERSlengthName$Month$Status$infile'TEXTFILETXT'dsdinputName$Month$ifMonth='FEB'theninputWeekWeekWeekWeekStatus$elseifMonth='MAR'theninputWeekWeekWeekWeekWeekStatus$formatWeekWeekdollarrunprocprintdata=WORKNUMBERSrunBdataWORKNUMBERSlengthName$Month$Status$infile'TEXTFILETXT'dlm=','missoverinputName$Month$ifMonth='FEB'theninputWeekWeekWeeternBCityStateRegionTulsaOKWesternLosAngelesCAWesternBangorCCityStateRegionTulsaOKCentralLosAngelesCAWesternBangorWesternDCityStateRegionTulsaOKCentralLosCAWesternBangorAnswer:AWhichstatementdescribesacharacteristicoftheSASautomaticvariableERRORATheERRORvariablemaintainsacountofthenumberofdataerrorsinaDATAstepBTheERRORvariableisaddedtotheprogramdatavectorandbecomespartofthedatasetbeingcreatedCTheERRORvariablecanbeusedinexpressionsintheDATAstepDTheERRORvariablecontainsthenumberoftheobservationthatcausedthedataerrorAnswer:CTheSASdatasetWORKONEcontainsanumericvariablenamedNumandacharactervariablenamedChar:WORKONENumCharThefollowingSASprogramissubmitted:procprintdata=WORKONEwhereNum=''runWhatisoutputANumCharBNumCharCNumCharDNooutputisgeneratedAnswer:DThedatasetWORKREALESTATEhasthevariableLocalFeewithaformatofandavariableCountryFeewithaformatofThefollowingSASprogramissubmitted:dataWORKFEESTRUCTUREformatLocalFeeCountryFeepercentsetWORKREALESTATLocalFee=LocalFeeCountryFee=CountryFeerunWhataretheformatsofthevariablesLOCALFEEandCOUNTRYFEEintheoutputdatasetALocalFeehasformatofandCountryFeehasaformatofBLocalFeehasformatofandCountryFeehasaformatofpercentCBothLocalFeeandCountryFeehaveaformatofpercentDThedatastepfailsexecutionthereisnoformatforLocalFeeAnswer:CGiventheSASdatasetWORKPRODUCTS:ProdIdPriceProductTypeSalesReturnsKSOUTDOORBSCLOTHINGRKYEQUIPMENTKLBYOUTDOORDYDWOUTDOORDGTYEQUIPMENTThefollowingSASprogramissubmitted:dataWORKOUTDOORWORKCLOTHWORKEQUIPsetWORKPRODUCTSifSalesGTifProductTypeEQ'OUTDOOR'thenoutputWORKOUTDOORelseifProductTypeEQ'CLOTHING'thenoutputWORKCLOTHelseifProductTypeEQ'EQUIPMENT'thenoutputWORKEQUIPrunHowmanyobservationsdoestheWORKOUTDOORdatasetcontainABCDAnswer:BWhichstepdisplaysalistingofallthedatasetsintheWORKlibraryAproccontentslib=WORKrunBproccontentslib=WORKallrunCproccontentsdata=WORKallrunDproccontentsdata=WORKALLrunAnswer:cWhichisavalidLIBNAMEstatementAlibname"SASdatalibrarylocation"Bsasdatalibname"SASdatalibrarylocation"Clibnamesasdata"SASdatalibrarylocation"Dlibnamesasdatasas"SASdatalibrarylocation"Answer:CGiventhefollowingrawdatarecords:|||Susan**Michael**Thefollowingoutputisdesired:ObsemployeebdateyearsSusanMichaelWhichSASprogramcorrectlyreadsintherawdataAdataemployeesinfile'filespecification'dlm='*'inputemployee$bdate:mmddyyyearsrunBdataemployeesinfile'filespecification'dsd='*'inputemployee$bdatemmddyyyearsrunCdataemployeesinfile'filespecification'dlmdsdinputemployee$bdatemmddyyyearsrunDdataemployeesinfile'filespecification'dlm='*'dsdinputemployee$bdate:mmddyyyearsrunAnswer:DGiventhefollowingcode:procprintdata=SASHELPCLASS(firstobs=obs=)whereSex='M'runHowmanyobservationswillbedisplayedABCorfewerDorfewerAnswer:DWhichstepsortstheobservationsofapermanentSASdatasetbytwovariablesandstoresthesortedobservationsinatemporarySASdatasetAprocsortout=EMPLOYEESdata=EMPSORTbyLnameandFnamerunBprocsortdata=SASUSEREMPLOYEESout=EMPSORTbyLnameFnamerunCprocsortout=SASUSEREMPLOYEESdata=WORKEMPSORTbyLnameFnamerunDprocsortdata=SASUSEREMPLOYEESout=SASUSEREMPSORTbyLnameandFnamerunAnswer:BGiventheSASdatasetWORKTEMPS:DayMonthTempMayMayJuneJuneJulyJulyThefollowingprogramissubmitted:procsortdata=WORKTEMPSbydescendingMonthDayrunprocprintdata=WORKTEMPSrunWhichoutputiscorrectAObsDayMonthTempJulyJulyJuneJuneMayMayBObsDayMonthTempMayJulyJuneJulyMayJuneCObsDayMonthTempMayMayJuneJuneJulyJulyDObsDayMonthTempMayMayJuneJuneJulyJulyAnswer:CGiventheSASdatasetWORKP:LocationPopAlaskaDelawareVermontWyomingandtheSASdatasetWORKP:StatePopAlaskaDelawareWyomingThefollowingoutputisdesired:ObsStatePopPopDifferenceAlaskaDelawareWyomingWhichSASprogramcorrectlycombinesthedataAdatacomparemergeWORKP(in=aLocation=State)WORKP(in=b)byStateifaandbDifference=PopPoprunBdatacomparemergeWORKP(rename=(Location=State))WORKPbyStateifaandbDifference=PopPoprunCdatacomparemergeWORKP(in=arename=(Location=State))WORKP(in=b)byStateifaandbDifference=PopPoprunDdatacomparemergeWORKP(in=a)(rename=(Location=State))WORKP(in=b)byStateifaandbDifference=PopPoprunAnswer:CThefollowingSASprogramissumbitted:dataWORKINFOinfile'DATAFILETXT'inputCompany$State$ifState=''theninputYearelseinputCityYearinputNumEmployeesrunHowmanyrawdatarecordsarereadduringeachiterationoftheDATAstepABCDAnswer:AYou'reattemptingtoreadarawdatafileandyouseethefollowingmessagesdisplayedintheSASLog:NOTE:InvaliddataforSalaryinlineRULE:F#MAYEmployeeId=employeegender=FSalary=birthdate=ERROR=N=NOTE:recordswerereadfromtheinfile'c:employeesdat'TheminimumrecordlengthwasThemaximumrecordlengthwasNOTE:ThedatasetWORKEMPLOYEEShasobservationsandvariablesWhatdoesitmeanAAcompilererror,triggeredbyaninvalidcharacterforthevariableSalaryBAnexecutionerror,triggeredbyaninvalidcharacterforthevariableSalaryCThestofpotentiallymanyerrors,thisoneoccurringonthethobservationDAnerrorontheINPUTstatementspecificationforreadingthevariableSalaryAnswer:BGiventhefollowingrawdatarecordsinDATAFILETXT:|||Kim,Basketball,Golf,TennisBill,FootballTracy,Soccer,TrackThefollowingprogramissubmitted:dataWORKSPORTSINFOlengthFnameSportSport$infile'DATAFILETXT'dlm=','inputFname$Sport$Sport$Sport$runprocprintdata=WORKSPORTSINFOrunWhichoutputiscorrectbasedonthesubmittedprogramAObsFnameSportSportSportKimBasketballGolfTennisBillFootballTracySoccerTrackBObsFnameSportSportSportKimBasketballGolfTennisBillFootballFootballFootballTracySoccerTrackTrackCObsFnameSportSportSportKimBasketballGolfTennisBillFootballTracySoccerDObsFnameSportSportSportKimBasketballGolfTennisBillFootballAnswer:CConsiderthefollowingdatastep:dataWORKNEWsetWORKOLDCountrunThevariableCountiscreatedusingasumstatementWhichstatementregardingthisvariableistrueAItisassignedavaluewhenthedatastepbeginsexecutionBItisassignedavalueofmissingwhenthedatastepbeginsexecutionCItisassignedavalueatcompiletimeDItisassignedavalueofmissingatcompiletimeAnswer:CThefollowingSASprogramissubmitted:dataWORKTESTsetWORKPILOTSifJobcode='Pilot'thenDescription='SeniorPilot'elseDescription='Unknown'runThevalueforthevariableJobcodeis:PILOTWhatisthevalueofthevariableDescriptionAPILOTBUnknownCSeniorPilotD''(missingcharactervalue)Answer:BAuserdefinedformathasbeencreatedusingtheFORMATprocedureHowisitstoredAinaSAScatalogBinamemoryresidentlookuptableCinaSASdatasetintheWORKlibraryDinaSASdatasetinapermanentSASdatalibraryAnswer:ATheseformatsmustbestoredintheWORKFORMATSorSASUSERFORMATScataloggiventheSASdatasetSASDATATWO:XYThefollowingSASprogramissubmitted:dataSASUSERONESASUSERTWOOTHERsetSASDATATWOifXeqthenoutputSASUSERONEifYltthenoutputSASUSERTWOoutputrunWhatistheresultAdatasetSASUSERONEhasobservationsdatasetSASUSERTWOhasobservationsdatasetWORKOTHERhasobservationsBdatasetSASUSERONEhasobservationsdatasetSASUSERTWOhasobservationsdatasetWORKOTHERhasobservationsCdatasetSASUSERONEhasobservationsdatasetSASUSERTWOhasobservationsdatasetWORKOTHERhasobservationsDNodatasetsareoutputTheDATAstepfailsexecutionduetosyntaxerrorsAnswer:AGiventhecontentsoftherawdatafile'EMPLOYEETXT':XingACCTBobMKTGJorgeEDUCThefollowingSASprogramissubmitted:dataWORKEMPLOYEEinfile'EMPLOYEETXT'inputFirstName$StartDateDepartment$runWhichSASinformatcorrectlycompletestheprogramAdateBmmddyyCddmmyyDmondayyrAnswer:BTheSASdatasetFedBankscontainsavariableOpenDatewhichhasbeenassignedapermanentlabelof"OpenDate"WhichSASprogramtemporarilyreplacesthelabel"OpenDate"withthelabel"StartingDate"intheoutputAprocprintdata=SASUSERHOUSESlabellabelOpenDate"StartingDate"runBprocprintdata=SASUSERHOUSESlabellabelOpenDate="StartingDate"runCprocprintdata=SASUSERHOUSESlabelOpenDate="StartingDate"runDprocprintdata=SASUSERHOUSESOpenDate="StartingDate"runAnswer:BGiventheSASdatasetWORKONE:XYZAABABBACThefollowingSASprogramissubmitted:dataWORKTWOsetWORKONEbyXYifFirstYrunprocprintdata=WORKTWOnoobsrunWhichreportisproducedAXYZBABBACBXYZABABBACCXYZABABBACDThePRINTprocedurefailsbecausethedatasetWORKTWOisnotcreatedintheDATAstepAnswer:BThefollowingSASprogramissubmitted:dataWORKAUTHORSarrayFavorites{}$('Shakespeare','Hemingway','McCaffrey')runWhatisthevalueofthesecondvariableinthedatasetWORKAUTHORSAHemingwayBHemingwaC''(amissingvalue)DTheprogramcontainserrorsNovariablesarecreatedAnswer:BThefollowingSASprogramissubmitted:dataWORKPRODUCTSProd=dowhile(ProdLE)ProdendrunWhatisthevalueofthevariableProdintheoutputdatasetABCD(missingnumeric)Answer:BGiventherawdatarecordinthefilephonetxt:||||StevensJamesSALESThefollowingSASprogramissubmitted:dataWORKPHONESinfile'phonetxt'inputEmpLName$EmpFName$Dept$Phone$Extension<insertcode>runWhichSASstatementcompletestheprogramandresultsinavalueof"JamesStevens"forthevariableFullNameAFullName=CATX('',EmpFName,EmpLName)BFullName=CAT('',EmpFName,EmpLName)CFullName=EmpFName!!EmpLNameDFullName=EmpFNameEmpLNameAnswer:AThefollowingSASprogramissubmitted:dataWORKONEText='Australia,US,Denmark'Pos=find(Text,'US','i',)runWhatvaluewillSASassigntoPosABCDAnswer:DGiventheSASdatasetWORKORDERS:WORKORDERSorderidcustomershippedJoshMartinFEBRachelLordsMARTakashiSatoJULThevariableorderidisnumericcustomerischaracterandshippedisnumeric,containsaSASdatevalue,andisshownwiththeDATEformatAprogrammerwouldliketocreateanewvariable,shipnote,thatshowsacharactervaluewiththeorderid,shippeddate,andcustomernameForexample,giventhefirstobservationshipnotewouldhavethevalue"OrdershippedonFEBtoJoshMartin"WhichofthefollowingstatementwillcorrectlycreatethevalueandassignittoshipnoteAshipnote=catx('','Order',orderid,'shippedon',input(shipped,date),'to',customer)Bshipnote=catx('','Order',orderid,'shippedon',char(shipped,date),'to',customer)Cshipnote=catx('','Order',orderid,'shippedon',transwrd(shipped,date),'to',customer)Dshipnote=catx('','Order',orderid,'shippedon',put(shipped,date),'to',customer)Answer:DThefollowingSASprogramissubmitted:dataONETWOSASUSERTWOsetSASUSERONErunAssumingthatSASUSERONEexists,howmanytemporaryandpermanentSASdatasetsarecreatedAtemporaryandpermanentSASdatasetsarecreatedBtemporaryandpermanentSASdatasetsarecreatedCtemporaryandpermanentSASdatasetsarecreatedDthereisanerrorandnonewdatasetsarecreatedAnswer:DThefollowingSASprogramissubmitted:odscsvallfile='c:testcvs'procprintdata=WORKONEvarNameScoreGradebyIdNumberrunodscsvallcloseWhatisproducedasoutputAAfilenamedtestcvsthatcanonlybeopenedinExcelBAtextfilenamedtestcvsthatcanbeopenedinExcelorinanytexteditorCAtextfilenamedtestcvsthatcanonlybeopenedinatexteditorDAfilenamedtestcvsthatcanonlybeopenedbySASAnswer:CGiventheSASdatasetWORKONE:ObsRevenueRevenueRevenueThefollowingSASprogramissubmitted:dataWORKTWOsetWORKONETotal=mean(ofRev:)runWhatvaluewillSASassigntoTotalABCDTheprogramfailstoexecuteduetoerrorsAnswer:BThefollowingoutputiscreatedbytheFREQUENCYprocedure:TheFREQProcedureTableofregionbyproductregionproductFrequency|Percent|RowPct|ColPct|corn|cotton|oranges|TotalEAST||||||||||||||||SOUTH||||||||||||||||TotalWhichTABLESoption(s)wouldbeusedtoeliminatetherowandcolumncountsandjustseethefrequenciesandpercentsAnorowcountnocolcountBfreqpercentCnorownocolDnocountsAnswer:CThefollowingSASprogramissubmitted:dataWORKTESTdropCityinfiledatalinesinputName$Address$City$ifCity='NewYork'theninputState$elseinputdatalinesJoeConleyMainStJanesvilleWIJaneNgyuenAlphaAveNewYorkNYJenniferJasonMtDiabloEurekaCAWhatwillthedatasetWORKTESTcontainANameAddressStateJoeConleyMainStJaneNgyuenAlphaAveNYJenniferJasonMtDiabloBNameAddressCityStateJoeConleyMainStJanesvilleJaneNgyuenAlphaAveNewYorkNYJenniferJasonMtDiabloEurekaCNameAddressStateJaneNgyuenAlphaAveNYDOobservations,thereisasyntaxerrorinthedatastepAnswer:AThefollowingSASprogramissubmitted:dataWORKTOTALSALES(keep=MonthSales{})setWORKMONTHLYSALES(keep=YearProductSales)arrayMonthSales{}doi=toMonthSales{i}=SalesenddropirunTheprogramfailsexecutionduetosyntaxerrorsWhatisthecauseofthesyntaxerrorAAnarraycannotbereferencedonakeep=datasetoptionBThekeep=datasetoptionshouldbe(keep=MonthSales*)CThekeep=datasetoptionshouldbethestatementKEEPMonthSales{}DThevariableMonthSalesdoesnotexistAnswer:AGiventheSASdatasetWORKONE:IdCharABCDandtheSASdatasetWORKTWO:IdCharEFGThefollowingprogramissubmitted:dataWORKBOTHsetWORKONEWORKTWObyIdrunWhatisthefirstobservationinSASdatasetWORKBOTHAIdCharCharABIdCharCharECIdCharCharAEDIdCharCharDGAnswer:AThefollowingprogramissubmitted:proccontentsdata=allrunWhichstatementbestdescribestheoutputfromthesubmittedprogramATheoutputcontainsonlyalistoftheSASdatasetsthatarecontainedintheWORKlibraryBTheoutputdisplaysonlythecontentsoftheSASdatasetsthatarecontainedintheWORKlibraryCTheoutputdisplaysonlythevariablesintheSASdatasetsthatarecontainedintheWORKlibraryDTheoutputcontainsalistoftheSASdatasetsthatarecontainedintheWORKlibraryanddisplaysthecontentsofthosedatasetsAnswer:DGiventheSASdatasetWORKEMPNAME:NameEmpIDJillJackJoanJohnGiventheSASdatasetWORKEMPDEPT:EmpIDDepartmentAccountingFinanceMarketingAccountingThefollowingprogramissubmitted:dataWORKALLmergeWORKEMPNAME(in=EmpN)WORKEMPDEPT(in=EmpD)byEmpidif(EmpNandnotEmpD)or(EmpDandnotEmpN)runHowmanyobservationsareindatasetWORKALLaftersubmittingtheprogramABCDAnswer:BThefollowingSASprogramissubmitted:dataWORKTOTALSALARYretainTotalsetWORKSALARYbyDepartmentifFirstDepartmentthenTotal=Total=sum(Total,Wagerate)ifLastTotalrunWhatistheinitialvalueofthevariableTotalABMissingCThevalueofthefirstobservationsWagerateDCannotbedeterminedfromtheinformationgivenAnswer:BConsiderthefollowingdatastep:dataWORKTESTsetSASHELPCLASS(obs=)retainCity'BeverlyHills'State='California'runThecomputedvariablesCityandStatehavetheirvaluesassignedusingtwodifferentmethods,aRETAINstatementandanAssignmentstatementWhichstatementregardingthisprogramistrueATheRETAINstatementisfine,butthevalueofCitywillbetruncatedtobytesastheLENGTHstatementhasbeenomittedBBoththeRETAINandassignmentstatementarebeingusedtoinitializenewvariablesandareequallyefficientMethodusedisamatterofprogrammerpreferenceCTheassignmentstatementisfine,butthevalueofCitywillbetruncatedtobytesastheLENGTHstatementhasbeenomittedDCity'svaluewillbeassignedonetime,State'svaluetimesAnswer:DThefollowingSASprogramissubmitted:dataWORKDATEINFOX="Jan"DrunVariableXcontainswhatvalueAthenumericvalueBthecharactervalue"Jan"CthedatevalueDthecodecontainsasyntaxerroranddoesnotexecuteAnswer:D注意D前面有空格ThefollowingoutputiscreatedbytheFREQUENCYprocedure:TheFREQProcedureTableofregionbyproductregionproductFrequency|Percent|RowPct|ColPct|corn|cotton|oranges|TotalEAST||||||||||||||||SOUTH||||||||||||||||TotalWhichTABLESstatementwasusedtocompletedthefollowingprogramthatproducedtheoutputprocfreqdata=sales<insertcode>runAtablesregionproductBtablesregion,productCtablesregionproductDtablesregion*productAnswer:DGiventheSASdatasetWORKONE:NBeginDateJANJANThefollowingSASprogramissubmitted:dataWORKTWOsetWORKONEDay=<insertcode>formatBeginDatedaterunThedatasetWORKTWOiscreated,whereDaywouldbeforSunday,forMonday,forTuesday,:WORKTWONBeginDateDayJANJANWhichexpressionsuccessfullycompletedtheprogramandcreatesthevariableDayAday(BeginDate)Bweekday(BeginDate)Cdayofweek(BeginDate)Dgetday(BeginDate,today())Answer:BThefollowingprogramissubmitted:procformatvaluesalfmt<='LessthanK'high='KorGreater'optionsfmterrnodatepageno=title'EmployeeReport'procprintdata=workemployeesnoobsvarfullnamesalaryhiredateformatsalarysalfmthiredatedatelabelfullname='NameofEmployee'salary='AnnualSalary'hiredate='DateofHire'runWhydoestheprogramfailAThePAGENOoptionisinvalidintheOPTIONSstatementBTheRUNstatementismissingaftertheFORMATprocedureCTheformatnamecontainsaperiodintheVALUEstatementDTheLABELoptionismissingfromthePROCPRINTstatementAnswer:CGiventhecontentsoftherawdatafileTYPECOLORDAT:daisyyellowThefollowingSASprogramissubmitted:dataFLOWERSinfile'TYPECOLORDAT'truncoverlengthType$Color$inputType$Color$runWhatarethevaluesofthevariablesTypeandColorAType=daisy,Color=yellowBType=daisy,Color=wCType=daisy,Color=daisyyellowDType=daisy,Color=Answer:DGiventheSASdatasetWORKPRODUCTS:ProdIdPriceProductTypeSalesReturnsKSOUTDOORBSCLOTHINGRKYEQUIPMENTKLBYOUTDOORDYDWOUTDOORDGTYEQUIPMENTThefollowingSASprogramissubmitted:dataWORKREVENUE(drop=SalesReturnsPrice)setWORKPRODUCTS(keep=ProdIdPriceSalesReturns)Revenue=Price*(SalesReturns)runHowmanyvariablesdoestheWORKREVENUEdatasetcontainABCDAnswer:AConsiderthedatastep:dataWORKTESTinfile'c:classcsv'dsdinputName$Sex$AgeHeightWeightifAgeNEandAgeNEthenGroup=elseGroup=runWhichstatementproducesafunctionallyequivalentresultforassigningGroupavalueAifAgenotin(,)thenGroup=elseGroup=Bif(AgeNE)or(AgeNE)thenGroup=elseGroup=CwhereAgenotbetweenandthenGroup=elseGroup=DbothAorCwillworkAnswer:AThefollowingSASprogramissubmitted:<insertodscode>procmeansdata=SASUSERSHOESwhereProductin('Sandal','Slipper','Boot')run<insertodscode>WhichODSstatements,insertedinthetwolocationsabove,createareportstoredinanhtmlfileAodshtmlopen='saleshtml'odshtmlcloseBodsfile='saleshtml'htmlodsfilecloseCodshtmlfile='saleshtml'odshtmlcloseDodsfilehtml='saleshtml'odsfilecloseAnswer:CThefollowingSASprogramissubmitted:dataWORKOUTDSdountil(ProdGT)ProdendrunWhatisthevalueofthevariableProdintheoutputdatasetA(missing)BCDUndetermined,infiniteloopAnswer:CThefollowingSASprogramissubmitted:dataWORKACCOUNTINGsetWORKDEPARTMENTlabelJobcode='JobDescription'runWhichstatementistrueabouttheoutputdatasetAThelabelofthevariableJobcodeisJob(onlythefirstword)BThelabelofthevariableJobcodeisJobDesc(onlythefirstcharacters)CThelabelofthevariableJobcodeisJobDescriptionDTheprogramfailstoexecuteduetoerrorsLabelsmustbedefinedinaPROCstepAnswer:CThefollowingSASprogramissubmitted:dataWORKSALESdoYear=todoMonth=toXendendrunHowmanyobservationsarewrittentotheWORKSALESdatasetABCDAnswer:BConsiderthefollowingdatastep:dataWORKNEWsetWORKOLD(keep=X)ifX<thenX=elseifX>=ANDXLTthenX=elseX=runInfilteringthevaluesofthevariableXindatasetWORKOLD,whatvaluenewvaluewouldbeassignedtoXifitsoriginalvaluewasamissingvalueAXwouldgetavalueofBXwouldgetavalueofCXwouldretainitsoriginalvalueofmissingDThisstepdoesnotrunbecauseofsyntaxerrorsAnswer:Amissingdata最小ThefollowingSASprogramissubmitted:dataWORKACCOUNTINGsetWORKDEPARTMENTlengthEmpId$CharEmpid=EmpIdrunIfdatasetWORKDEPARTMENThasanumericvariableEmpId,whichstatementistrueabouttheoutputdatasetAThetypeofthevariableCharEmpidisnumericBThetypeofthevariableCharEmpidisunknownCThetypeofthevariableCharEmpidischaracterDTheprogramfailstoexecuteduetoerrorsAnswer:DGiventhedatasetWORKEMPDATA:EmployeeManagerIDJobTitleDepartmentIDDirectorSalesManagementSalesManagerSalesManagementSalesManagerIISalesManagementAdministrationManagerAdministrationSecretaryIAdministrationWhichoneofthefollowingwherestatementswoulddisplayobservationswithjobtitlescontainingtheword'Manager'Awheresubstr(JobTitle,(length(JobTitle)))='Manager'Bwhereupcase(scan(JobTitle,,''))='MANAGER'CwhereJobTitle='Manager'DwhereJobTitlelike'Manager'Answer:DAfteraSASprogramissubmitted,thefollowingiswrittentotheSASlog:dataWORKJANUARYsetWORKALLYEAR(keep=ProductMonthQuantityCost)ifMonth='JAN'thenoutputWORKJANUARYSales=Cost*Quantitydrop=MonthQuantityCostERROR:Syntaxerror,expectingoneofthefollowing:!,!!,,*,**,,,,<=,<>,=,>,>=,AND,EQ,GE,GT,IN,LE,LT,MAX,MIN,NE,NG,NL,NOTIN,OR,^=,|,||,~=runWhatdatasetoptioncouldbeattachedtoWORKJANUARYtoreplacetheDROPstatementthatgeneratedtheerrorinthelogA(dropMonthQuantityCost)B(dropMonth,Quantity,Cost)C(drop=Month,Quantity,Cost)D(drop=MonthQuantityCost)Answer:

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

文档小程序码

使用微信“扫一扫”扫码寻找文档

1

打开微信

2

扫描小程序码

3

发布寻找信息

4

等待寻找结果

我知道了
评分:

/43

SAS base题70真题附答案

VIP

在线
客服

免费
邮箱

爱问共享资料服务号

扫描关注领取更多福利