2023年SASbase考試必備真題附答案_第1頁
2023年SASbase考試必備真題附答案_第2頁
2023年SASbase考試必備真題附答案_第3頁
2023年SASbase考試必備真題附答案_第4頁
2023年SASbase考試必備真題附答案_第5頁
已閱讀5頁,還剩70頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1.ThefollowingSASprogramissubmitted:dataWORK.TOTAL;setWORK.SALARY;byDepartmentGender;ifFirst.<_insert_code_>thenPayroll=0;Payroll+Wagerat(yī)e;ifLast.<_insert_code_>;run;TheSASdatasetWORK.SALARYiscurrentlyorderedbyGenderwithinDepartment.WhichinsertedcodewillaccumulatesubtotalsforeachGenderwithinDepartment?A.GenderB.DepartmentC.GenderDepartmentD.DepartmentGenderAnswer:A-------------------------2.GiventhefollowingrawdatarecordsinTEXTFILE.TXT:-|10|----20---|----30John,FEB,13,25,14,27,F(xiàn)inalJohn,MAR,26,17,29,11,23,CurrentTina,FEB,15,18,12,13,F(xiàn)inalTina,MAR,29,14,19,27,20,CurrentThefollowingoutputisdesired:ObsNameMonthStatusWeek1Week2Week3Week4Wee(cuò)k51JohnFEBFinal$13$25$14$27.2JohnMARCurrent$26$17$29$11$233TinaFEBFinal$15$18$12$13.4TinaMARCurrent$29$14$19$27$20WhichSASprogramcorrectlyproducesthedesiredoutput?A.dataWORK.NUMBERS;lengthName$4Month$3Status$7;infile'TEXTFILE.TXT'dsd;inputName$Month$;ifMonth='FEB'theninputWeek1Week2Wee(cuò)k3Week4Stat(yī)us$;elseifMonth='MAR'theninputWeek1Week2Week3Week4Wee(cuò)k5Status$;formatWeek1-Week5dollar6.;run;procprintdata=WORK.NUMBERS;run;B.dataWORK.NUMBERS;lengthName$4Month$3Status$7;infile'TEXTFILE.TXT'dlm=','missover;inputName$Month$;ifMonth='FEB'theninputWeek1Week2Week3Week4Status$;elseifMonth='MAR'theninputWeek1Week2Week3Week4Week5Status$;formatWeek1-Week5dollar6.;run;procprintdat(yī)a=WORK.NUMBERS;run;C.dataWORK.NUMBERS;lengthName$4Month$3Stat(yī)us$7;infile'TEXTFILE.TXT'dlm=',';inputName$Month$@;ifMonth='FEB'theninputWeek1Week2Wee(cuò)k3Week4Stat(yī)us$;elseifMonth='MAR'theninputWee(cuò)k1Week2Week3Wee(cuò)k4Wee(cuò)k5Status$;formatWeek1-Week5dollar6.;run;procprintdata=WORK.NUMBERS;run;D.dataWORK.NUMBERS;lengthName$4Month$3Stat(yī)us$7;infile'TEXTFILE.TXT'dsd@;inputName$Month$;ifMonth='FEB'theninputWeek1Week2Wee(cuò)k3Week4Status$;elseifMonth='MAR'theninputWeek1Wee(cuò)k2Wee(cuò)k3Wee(cuò)k4Wee(cuò)k5Status$;formatWeek1-Week5dollar6.;run;procprintdata=WORK.NUMBERS;run;Answer:C------------------------3.TheExcelworkbookREGIONS.XLScontainsthefollowingfourworkshee(cuò)ts:EASTWESTNORTHSOUTHThefollowingprogramissubmitted:libnameMYXLS'regions.xls';WhichPROCPRINTstepcorrectlydisplaystheNORTHworksheet?A.procprintdata=MYXLS.NORTH;run;B.procprintdat(yī)a=MYXLS.NORTH$;run;C.procprintdata=MYXLS.'NORTH'e;run;D.procprintdat(yī)a=MYXLS.'NORTH$'n;run;Answer:D----------------------4.ThefollowingSASprogramissubmitted:dataWORK.DATE_INFO;Day="01";Yr=1960;X=mdy(Day,01,Yr);run;WhatisthevalueofthevariableX?A.thenumericvalue0B.thecharactervalue"01011960"C.a(chǎn)missingvalueduetosyntaxerrorsD.thestepwillnotcompilebecauseofthecharacterargumentinthemdyfunction.Answer:A---------------------5.Whichstat(yī)ementspecifiesthatrecords1through10aretobereadfromtherawdatafilecustomer.txt?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;105kee(cuò)p=ProductSales;--22ERROR22-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.WhichofthefollowingchoicesisanunacceptableODSdestinationforproducingoutputthat(yī)canbeviewedinMicrosoftExcel?A.MSOFFICE2KB.EXCELXPC.CSVALLD.WINXPAnswer:D----------------------8.TheSASdat(yī)asetnamedWORK.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);inthedat(yī)astepcausesasyntaxerror.C.ThevaluesofthevariablePayrollrepresentthemonthlytotalforeachdepartmentintheWORK.SALARYdataset.D.ThevaluesofthevariablePayrollrepresentamonthlytotalforallvaluesofWAGERATEintheWORK.SALARYdat(yī)aset.Answer:C-------------10.ThefollowingSASprogramissubmitted:dataWORK.RETAIL;Cost='$20,000';Discount=.10*Cost;run;Whatistheresult?A.ThevalueofthevariableDiscountintheoutputdatasetis2023.NomessagesarewrittentotheSASlog.B.ThevalueofthevariableDiscountintheoutputdatasetis2023.Anotethat(yī)conversionhastakenplaceiswrittentotheSASlog.C.ThevalueofthevariableDiscountintheoutputdat(yī)asetismissing.AnoteintheSASlogreferstoinvalidnumericdata.D.ThevariableDiscountintheoutputdat(yī)asetissettozero.NomessagesarewrittentotheSASlog.Answer:C由于有一個(gè)$符號---------------------------11.GiventheexistingSASprogram:procformat(yī);valueagegrplow-12='Pre-Teen'13-high='Tee(cuò)n';run;procmeansdata=SASHELP.CLASS;varHeight;classSexAge;formatAgeagegrp.;run;Whichstatementintheprocmeansstepneedstobemodifiedoraddedtogeneratethefollowingresults:AnalysisVariable:HeightNSexAgeObsMinimumMaximumMean--------------------------------FPre-Teen351.359.855.8Tee(cuò)n656.566.563.0MPre-Tee(cuò)n457.364.859.7Teen662.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:JANFEBMARWhichstatementcorrectlyassignsalibraryreferencetotheExcelworkbook?A.libnameqtrdat(yī)a'qtr1.xls';B.libname'qtr1.xls'shee(cuò)ts=3;C.libnamejanfebmar'qtr1.xls';D.libnamemydata'qtr1.xls'WORK.heets=(jan,feb,mar);Answer:A--------------------13.ThefollowingSASprogramissubmitted:dataWORK.TEST;setWORK.MEASLES(kee(cuò)p=JanptFebptMarpt);arrayDiff{3}Difcount1-Difcount3;arrayPatients{3}JanptFebptMarpt;run;What(yī)newvariablesarecreat(yī)ed?A.Difcount1,Difcount2andDifcount3B.Diff1,Diff2andDiff3C.Janpt,F(xiàn)ebpt,andMarptD.Patients1,Pat(yī)ients2andPat(yī)ients3Answer:A-------------------------14.WhichofthefollowingprogramscorrectlyinvokestheDATAStepDebugger:A.dataWORK.TESTdebug;setWORK.PILOTS;Stat(yī)e=scan(cityStat(yī)e,2,'');ifState='NE'thendescription='Central';run;B.dataWORK.TESTdebugger;setWORK.PILOTS;State=scan(cityState,2,'');ifStat(yī)e='NE'thendescription='Central';run;C.dat(yī)aWORK.TEST/debug;setWORK.PILOTS;State=scan(cityState,2,'');ifState='NE'thendescription='Central';run;D.dataWORK.TEST/debugger;setWORK.PILOTS;State=scan(cityStat(yī)e,2,'');ifStat(yī)e='NE'thendescription='Central';run;Answer:c------------------15.Whichstat(yī)ementistrueconcerningtheSASautomat(yī)icvariable_ERROR_?A.Itcannotbeusedinanif/thencondition.B.Itcannotbeusedinanassignmentstatement.C.Itcanbeputintoakeepstatementorkeep=option.D.Itisautomat(yī)icallydropped.Answer:D-------------------16.ThefollowingSASprogramissubmitted:dataWORK.DATE_INFO;X='04jul2023'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'thenState='OK';Region='Central';ifCity='LosAngeles'thenState='CA';Region='Western';datalines;TulsaLosAngelesBangor;run;Afterdat(yī)astepexecution,whatwilldatasetWORK.GEOcontain?A.CityStateRegion----------TulsaOKWesternLosAngelesCAWesternBangorWesternB.CityStateRegion---------TulsaOKWesternLosAngelesCAWesternBangorC.CityStateRegion-TulsaOKCentralLosAngelesCAWesternBangorWesternD.CityStateRegion-------TulsaOKCentralLosCAWesternBangorAnswer:A------------------------18.WhichstatementdescribesacharacteristicoftheSASautomaticvariable_ERROR_?A.The_ERROR_variablemaintainsacountofthenumberofdat(yī)aerrorsinaDATAstep.B.The_ERROR_variableisaddedtotheprogramdatavectorandbecomespartofthedatasetbeingcreat(yī)ed.C.The_ERROR_variablecanbeusedinexpressionsintheDATAstep.D.The_ERROR_variablecontainsthenumberoftheobservat(yī)ionthatcausedthedataerror.Answer:C--------------------------19.TheSASdatasetWORK.ONEcontainsanumericvariablenamedNumandacharactervariablenamedChar:WORK.ONENumChar-------123323177ThefollowingSASprogramissubmitted:procprintdata=WORK.ONE;whereNum='1';run;What(yī)isoutput?A.NumChar---123B.NumChar----123177C.NumChar123323177D.Nooutputisgenerat(yī)ed.Answer:D------------------------20.ThedatasetWORK.REALESTATEhasthevariableLocalFeewithaformatof9.andavariableCountryFeewithaformatof7.;ThefollowingSASprogramissubmitted:dataWORK.FEE_STRUCTURE;format(yī)LocalFeeCountryFeepercent7.2;setWORK.REALESTAT;LocalFee=LocalFee(cuò)/100;CountryFee=CountryFee/100;run;WhataretheformatsofthevariablesLOCALFEEandCOUNTRYFEEintheoutputdataset?A.LocalFeehasformatof9.a(chǎn)ndCountryFee(cuò)hasaformat(yī)of7.B.LocalFeehasformat(yī)of9.a(chǎn)ndCountryFeehasaformatofpercent7.2C.BothLocalFeeandCountryFeehaveaformatofpercent7.2D.Thedat(yī)astepfailsexecution;thereisnoformatforLocalFee.Answer:C------------21.GiventheSASdatasetWORK.PRODUCTS:ProdIdPriceProductTypeSalesReturns--------------K12S95.50OUTDOOR152B132S2.99CLOTHING30010R18KY251.99EQUIPMENT2553KL8BY6.39OUTDOOR12515DY65DW5.60OUTDOOR455DGTY2334.55EQUIPMENT672ThefollowingSASprogramissubmitted:dat(yī)aWORK.OUTDOORWORK.CLOTHWORK.EQUIP;setWORK.PRODUCTS;ifSalesGT30;ifProductTypeEQ'OUTDOOR'thenoutputWORK.OUTDOOR;elseifProductTypeEQ'CLOTHING'thenoutputWORK.CLOTH;elseifProductTypeEQ'EQUIPMENT'thenoutputWORK.EQUIP;run;Howmanyobservat(yī)ionsdoestheWORK.OUTDOORdatasetcontain?A.1B.2C.3D.6Answer:B------------------22.WhichstepdisplaysalistingofallthedatasetsintheWORKlibrary?A.proccontentslib=WORKrun;B.proccontentslib=WORK.all;run;C.proccontentsdata=WORK._all_;run;D.proccontentsdata=WORK_ALL_;run;Answer:c-----------23.WhichisavalidLIBNAMEstat(yī)ement?A.libname"_SAS_data_library_location_";B.sasdatalibname"_SAS_dat(yī)a_library_locat(yī)ion_";C.libnamesasdata"_SAS_data_library_location_";D.libnamesasdatasas"_SAS_data_library_location_";Answer:C-------------------24.Giventhefollowingrawdatarecords:|10---|----20---|30Susan*12/29/1970*10Michael**6Thefollowingoutputisdesired:Obsemployeebdateyears1Susan4015102Michael.6WhichSASprogramcorrectlyreadsintherawdata?A.dataemployees;infile'filespecification'dlm='*';inputemployee(cuò)$bdate:mmddyy10.years;run;B.dataemployees;infile'filespecification'dsd='*';inputemployee(cuò)$bdat(yī)emmddyy10.years;run;C.dataemployee(cuò)s;infile'filespecification'dlmdsd;inputemployee$bdat(yī)emmddyy10.years;run;D.dataemployees;infile'filespecificat(yī)ion'dlm='*'dsd;inputemployee(cuò)$bdate:mmddyy10.years;run;Answer:D---------------------------25.Giventhefollowingcode:procprintdata=SASHELP.CLASS(firstobs=5obs=15);whereSex='M';run;Howmanyobservationswillbedisplayed?A.11B.15C.10orfewerD.11orfewerAnswer:D-----------26.WhichstepsortstheobservationsofapermanentSASdatasetbytwovariablesandstoresthesortedobservat(yī)ionsinatemporarySASdataset?A.procsortout=EMPLOYEESdat(yī)a=EMPSORT;byLnameandFname;run;B.procsortdata=SASUSER.EMPLOYEESout=EMPSORT;byLnameFname;run;C.procsortout=SASUSER.EMPLOYEESdata=WORK.EMPSORT;byLnameFname;run;D.procsortdata=SASUSER.EMPLOYEESout=SASUSER.EMPSORT;byLnameandFname;run;Answer:B--------------------27.GiventheSASdatasetWORK.TEMPS:DayMonthTemp--------1May7515May7015June803June762July8514July89Thefollowingprogramissubmitted:procsortdat(yī)a=WORK.TEMPS;bydescendingMonthDay;run;procprintdat(yī)a=WORK.TEMPS;run;Whichoutputiscorrect?A.ObsDayMonthTemp---------------12July85214July8933June76415June8051May75615May7B.ObsDayMonthTemp---------------11May7522July8533June76414July89515May70615June80C.ObsDayMonthTemp---------11May75215May7033June76415June8052July85614July89D.ObsDayMonthTemp------------115May7021May75315June8043June76514July8962July85A(chǔ)nswer:C-------------------28.GiventheSASdatasetWORK.P2023:LocationPop2023---------Alaska626931Delaware783595Vermont608826Wyoming493782andtheSASdatasetWORK.P2023:StatePop2023----------Alaska686293Delaware873092Wyoming532668Thefollowingoutputisdesired:ObsStatePop2023Pop2023Difference1Alaska626931686293593622Delaware783595873092894973Wyoming49378253266838886WhichSASprogramcorrectlycombinesthedat(yī)a?A.datacompare;mergeWORK.P2023(in=_aLocat(yī)ion=State)WORK.P2023(in=_b);byState;if_aand_b;Difference=Pop2023-Pop2023;run;B.datacompare;mergeWORK.P2023(rename=(Location=State))WORK.P2023;byState;if_aand_b;Difference=Pop2023-Pop2023;run;C.datacompare;mergeWORK.P2023(in=_arename=(Location=State))WORK.P2023(in=_b);byState;if_aand_b;Difference=Pop2023-Pop2023;run;D.datacompare;mergeWORK.P2023(in=_a)(rename=(Location=State))WORK.P2023(in=_b);byState;if_aand_b;Difference=Pop2023-Pop2023;run;Answer:C-----------------------29.ThefollowingSASprogramissumbitted:dataWORK.INFO;infile'DATAFILE.TXT';input@1Company$20.@25Stat(yī)e$2.@;ifState=''theninput@30Year;elseinput@30CityYear;inputNumEmployees;run;Howmanyrawdat(yī)arecordsarereadduringeachiterationoftheDATAstep?A.1B.2C.3D.4Answer:A----------30.You'reat(yī)temptingtoreadarawdatafileandyousee(cuò)thefollowingmessagesdisplayedintheSASLog:NOTE:Invaliddat(yī)aforSalaryinline415-23.RULE:----+----1----+----2-+-3----+----4----+----5--4120234F46#3011MAY195433Employee(cuò)_Id=120234employee(cuò)_gender=FSalary=.birth_dat(yī)e=-2061_ERROR_=1_N_=4NOTE:20recordswerereadfromtheinfile'c:\employees.dat'.Theminimumrecordlengthwas33.Themaximumrecordlengthwas33.NOTE:ThedatasetWORK.EMPLOYEEShas20observationsand4variables.What(yī)doesitmean?A.Acompilererror,triggeredbyaninvalidcharacterforthevariableSalary.B.Anexecutionerror,triggeredbyaninvalidcharacterforthevariableSalary.C.The1stofpotentiallymanyerrors,thisoneoccurringonthe4thobservat(yī)ion.D.AnerrorontheINPUTstatementspecificationforreadingthevariableSalary.Answer:B------------------31.GiventhefollowingrawdatarecordsinDATAFILE.TXT:----|10---|----20---|----30Kim,Basketball,Golf,TennisBill,FootballTracy,Soccer,TrackThefollowingprogramissubmitted:dataWORK.SPORTS_INFO;lengthFnameSport1-Sport3$10;infile'DATAFILE.TXT'dlm=',';inputFname$Sport1$Sport2$Sport3$;run;procprintdat(yī)a=WORK.SPORTS_INFO;run;Whichoutputiscorrectbasedonthesubmittedprogram?A.ObsFnameSport1Sport2Sport31KimBasketballGolfTennis2BillFootball3TracySoccerTrackB.ObsFnameSport1Sport2Sport31KimBasketballGolfTennis2BillFootballFootballFootball3TracySoccerTrackTrackC.ObsFnameSport1Sport2Sport31KimBasketballGolfTennis2BillFootballTracySoccerD.ObsFnameSport1Sport2Sport31KimBasketballGolfTennis2BillFootballAnswer:C--------------------32.Considerthefollowingdatastep:dataWORK.NEW;setWORK.OLD;Count+1;run;ThevariableCountiscreatedusingasumstat(yī)ement.Whichstatementregardingthisvariableistrue?A.Itisassignedavalue0whenthedat(yī)astepbeginsexecution.B.Itisassignedavalueofmissingwhenthedat(yī)astepbeginsexecution.C.Itisassignedavalue0atcompiletime.D.Itisassignedavalueofmissingatcompiletime.Answer:C----------------33.ThefollowingSASprogramissubmitted:dataWORK.TEST;setWORK.PILOTS;ifJobcode='Pilot2'thenDescription='SeniorPilot';elseDescription='Unknown';run;ThevalueforthevariableJobcodeis:PILOT2.WhatisthevalueofthevariableDescription?A.PILOT2B.UnknownC.SeniorPilotD.''(missingcharactervalue)Answer:B---------------------------------34.Auser-definedformathasbeencreatedusingtheFORMATprocedure.Howisitstored?A.inaSAScatalogB.inamemoryresidentlookuptableC.inaSASdatasetintheWORKlibraryD.inaSASdatasetinapermanentSASdatalibraryAnswer:ATheseformatsmustbestoredintheWORK.FORMATSorSASUSER.FORMATScatalog------------------------35.giventheSASdat(yī)asetSASDATA.TWO:XY----523156ThefollowingSASprogramissubmitted:dataSASUSER.ONESASUSER.TWOOTHER;setSASDATA.TWO;ifXeq5thenoutputSASUSER.ONE;ifYlt5thenoutputSASUSER.TWO;output;run;Whatistheresult?A.datasetSASUSER.ONEhas5observationsdatasetSASUSER.TWOhas5observationsdatasetWORK.OTHERhas3observationsB.datasetSASUSER.ONEhas2observationsdatasetSASUSER.TWOhas2observationsdatasetWORK.OTHERhas1observationsC.datasetSASUSER.ONEhas2observationsdat(yī)asetSASUSER.TWOhas2observationsdatasetWORK.OTHERhas5observationsD.Nodatasetsareoutput.TheDATAstepfailsexecutionduetosyntaxerrors.Answer:A----------------------36.Giventhecontentsoftherawdatafile'EMPLOYEE.TXT':-+----10---+----20---+30--Xing2192023ACCTBob5222023MKTGJorge3142023EDUCThefollowingSASprogramissubmitted:dat(yī)aWORK.EMPLOYEE;infile'EMPLOYEE.TXT';input@1FirstName$@15StartDate@25Department$;run;WhichSASinformat(yī)correctlycompletestheprogram?A.date9.B.mmddyy10.C.ddmmyy10.D.mondayyr10.Answer:B-------------------37.TheSASdatasetFed.BankscontainsavariableOpen_Datewhichhasbeenassignedapermanentlabelof"OpenDate".WhichSASprogramtemporarilyreplacesthelabel"OpenDate"withthelabel"StartingDate"intheoutput?A.procprintdata=SASUSER.HOUSESlabel;labelOpen_Date"StartingDate";run;B.procprintdata=SASUSER.HOUSESlabel;labelOpen_Date="StartingDate";run;C.procprintdata=SASUSER.HOUSES;labelOpen_Date="StartingDate";run;D.procprintdata=SASUSER.HOUSES;Open_Dat(yī)e="StartingDate";run;Answer:B--------------------------------38.GiventheSASdat(yī)asetWORK.ONE:XYZ----1A271A331B452A522B693B704A824C91ThefollowingSASprogramissubmitted:dat(yī)aWORK.TWO;setWORK.ONE;byXY;ifFirst.Y;run;procprintdata=WORK.TWOnoobs;run;Whichreportisproduced?A.XYZ------1B452A522B693B704A824C91B.XYZ------1A271B452A522B693B704A824C91C.XYZ------1A331B452A522B693B704A824C91D.ThePRINTprocedurefailsbecausethedat(yī)asetWORK.TWOisnotcreat(yī)edintheDATAstep.Answer:B-----------------------------------------39.ThefollowingSASprogramissubmitted:dataWORK.AUTHORS;arrayFavorites{3}$8('Shakespeare','Hemingway','McCaffrey');run;WhatisthevalueofthesecondvariableinthedatasetWORK.AUTHORS?A.HemingwayB.HemingwaC.''(amissingvalue)D.Theprogramcontainserrors.Novariablesarecreat(yī)ed.Answer:B----------------------------40.ThefollowingSASprogramissubmitted:dat(yī)aWORK.PRODUCTS;Prod=1;dowhile(ProdLE6);Prod+1;end;run;What(yī)isthevalueofthevariableProdintheoutputdataset?A.6B.7C.8D..(missingnumeric)Answer:B---------------------------41.Giventherawdat(yī)arecordinthefilephone.txt:----|-10|----20---|-30|StevensJamesSALES304-923-372114ThefollowingSASprogramissubmitted:dataWORK.PHONES;infile'phone.txt';inputEmpLN(yùn)ame$EmpFName$Dept$Phone$Extension;<_insert_code_>run;WhichSASstat(yī)ementcompletestheprogramandresultsinavalueof"JamesStevens"forthevariableFullName?A.FullName=CATX('',EmpFName,EmpLN(yùn)ame);B.FullName=CAT('',EmpFName,EmpLName);C.FullName=EmpFName!!EmpLName;D.FullName=EmpFName+EmpLName;Answer:A----------------------------42.ThefollowingSASprogramissubmitted:dataWORK.ONE;Text='Australia,US,Denmark';Pos=find(Text,'US','i',5);run;WhatvaluewillSASassigntoPos?A.0B.1C.2D.12Answer:D-------------------------------43.GiventheSASdatasetWORK.ORDERS:WORK.ORDERSorder_idcustomershipped---------9341JoshMartin02FEB20239874RachelLords14MAR202310233TakashiSato07JUL2023Thevariableorder_idisnumeric;customerischaracter;andshippedisnumeric,containsaSASdat(yī)evalue,andisshownwiththeDATE9.format(yī).Aprogrammerwouldliketocreateanewvariable,ship_note,thatshowsacharactervaluewiththeorder_id,shippeddate,andcustomername.Forexample,giventhefirstobservat(yī)ionship_notewouldhavethevalue"Order9341shippedon02FEB2023toJoshMartin".Whichofthefollowingstatementwillcorrectlycreatethevalueandassignittoship_note?A.ship_note=catx('','Order',order_id,'shippedon',input(shipped,date9.),'to',customer);B.ship_note=cat(yī)x('','Order',order_id,'shippedon',char(shipped,dat(yī)e9.),'to',customer);C.ship_note=catx('','Order',order_id,'shippedon',transwrd(shipped,date9.),'to',customer);D.ship_note=catx('','Order',order_id,'shippedon',put(shipped,date9.),'to',customer);Answer:D----------------------------------------44.ThefollowingSASprogramissubmitted:dataONETWOSASUSER.TWOsetSASUSER.ONE;run;AssumingthatSASUSER.ONEexists,howmanytemporaryandpermanentSASdatasetsarecreated?A.2temporaryand1permanentSASdatasetsarecreatedB.3temporaryand2permanentSASdatasetsarecreatedC.2temporaryand2permanentSASdatasetsarecreat(yī)edD.thereisanerrorandnonewdatasetsarecreat(yī)edAnswer:D----------------------------------45.ThefollowingSASprogramissubmitted:odscsvallfile='c:\test.cvs';procprintda

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論