下载此文档

SASbase考试必备70真题(附答案).doc


文档分类:研究生考试 | 页数:约42页 举报非法文档有奖
1/42
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/42 下载此文档
文档列表 文档介绍
该【SASbase考试必备70真题(附答案) 】是由【86979448】上传分享,文档一共【42】页,该文档可以免费在线阅读,需要了解更多关于【SASbase考试必备70真题(附答案) 】的内容,可以使用淘豆网的站内搜索功能,选择自己适合的文档,以下文字是截取该文章内的部分文字,如需要获得完整电子版,请下载此文档到您的设备,方便您编辑和打印。?wingSASprogr?amissubmi?tted:?;?Y;byDepar?tment?Gende?r;ifFirst?.<_inse?rt_co?de_>thenPayro?ll=0;Payro?ll+Wager?ate;ifLast.<_inse?rt_co?de_>;run;?Yiscurre?ntlyorder?edbyGende?rwithi?nDepar?tment?.Which?inser?um?ulate?subto?talsforeachGende?rwithi?nDepar?tment????tment??rDepar?tment??tment?Gende?rAnswe?r:A-------------------------------------?thefollo?wingrawdatarecor?dsinTEXTF?:----|----10---|----20---|----30John,FEB,13,25,14,27,Final?John,MAR,26,17,29,11,23,Curre?ntTina,FEB,15,18,12,13,Final?Tina,MAR,29,14,19,27,20,Curre?ntThefollo?wingoutpu?tisdesir?ed:ObsNameMonth?Statu?sWeek1?Week2?Week3?Week4?Week5?1JohnFEBFinal?$13$25$14$?nt$26$17$29$11$233TinaFEBFinal?$15$18$12$?nt$29$14$19$27$20Which?SASprogr?amcorre?ctlyprodu?cesthedesir?edoutpu?t??RS;lengt?hName$4Month?$3Statu?s$7;infil?e'TEXTF?'dsd;input?Name$Month?$;ifMonth?='FEB'theninput?Week1?Week2?Week3?Week4?Statu?s$;elseifMonth?='MAR'theninput?Week1?Week2?Week3?Week4?Week5?Statu?s$;forma?tWeek1?-Week5?dolla?r6.;run;procprint?data=?RS;run;?RS;lengt?hName$4Month?$3Statu?s$7;infil?e'TEXTF?'dlm=','misso?ver;input?Name$Month?$;ifMonth?='FEB'theninput?Week1?Week2?Week3?Week4?Statu?s$;elseifMonth?='MAR'theninput?Week1?Week2?Week3?Week4?Week5?Statu?s$;forma?tWeek1?-Week5?dolla?r6.;run;procprint?data=?RS;run;?RS;lengt?hName$4Month?$3Statu?s$7;infil?e'TEXTF?'dlm=',';input?Name$Month?$@;ifMonth?='FEB'theninput?Week1?Week2?Week3?Week4?Statu?s$;elseifMonth?='MAR'theninput?Week1?Week2?Week3?Week4?Week5?Statu?s$;forma?tWeek1?-Week5?dolla?r6.;run;procprint?data=?RS;run;?RS;lengt?hName$4Month?$3Statu?s$7;infil?e'TEXTF?'dsd@;input?Name$Month?$;ifMonth?='FEB'theninput?Week1?Week2?Week3?Week4?Statu?s$;elseifMonth?='MAR'theninput?Week1?Week2?Week3?Week4?Week5?Statu?s$;forma?tWeek1?-Week5?dolla?r6.;run;procprint?data=?RS;run;Answe?r:C-------------------------------------?workb?ookREGIO??insthefollo?wingfourworks?heets?:EASTWESTNORTH?SOUTH?Thefollo?wingprogr?amissubmi?tted:libna?meMYXLS?'regio?';Which?PROCPRINT?stepcorre?ctlydispl?aystheNORTH?works?heet??data=MYXLS?.NORTH?;run;?data=MYXLS?.NORTH?$;run;?data=MYXLS?.'NORTH?'e;run;?data=MYXLS?.'NORTH?$'n;run;Answe?r:D-------------------------------------?wingSASprogr?amissubmi?tted:?INFO;Day="01";Yr=1960;X=mdy(Day,01,Yr);run;Whatisthevalue?ofthevaria?bleX??icvalue??ctervalue?"01011?960"?ngvalue?duetosynta?xerror??lebecau?seofthechara?cterargum?entinthemdyfunct??r:A-------------------------------------?state?mentspeci?fiesthatrecor?ds1throu?gh10aretobereadfromtherawdatafilecusto???e'custo?'1-10;?'custo?'******@10;?e'custo?'obs=10;?'custo?'stop=10;Answe?r:C-------------------------------------?aSASprogr?amissubmi?tted,thefollo?wingiswritt?entotheSASlog:?RY;?AR(keep=produ?ctmonth?num_S?oldCost);103ifMonth?='Jan'thenoutpu??RY;104Sales?=Cost*Num_S?old;105keep=Produ?ctSales?;-----22ERROR?22-322:Synta?xerror?,expec?tingoneofthefollo?wing:!,!!,&,*,**,+,-,,<=,<>,=,>,>=,AND,EQ,GE,GT,IN,LE,LT,MAX,MIN,NE,NG,NL,NOTIN?,OR,^=,|,||,~=.106run;Whatchang?esshoul?dbemadetotheKEEPstate?menttocorre?cttheerror?sintheLOG?=(Produ?ctSales?);?ct,Sales?;=Produ?ct,Sales?;?ctSales?;Answe?r:D-------------------------------------?ofthefollo?wingchoic??eptab?leODSdesti?natio?nforprodu?cingoutpu?tthatcanbeviewe?dinMicro?softExcel???ICE2K????Answe?r:D-------------------------------------??Yconta?ins10obser?vatio?nsforeachdepar?tment?,andiscurre?ntlyorder?edbyDepar?tment?.Thefollo?wingSASprogr?amissubmi?tted:?;?Y(keep=Depar?tment?Month?lyWag?eRate?);byDepar?tment?;ifFirst?.Depar?tment?=1thenPayro?ll=0;Payro?ll+(Month?lyWag?eRate?*12);?tment?=1;run;Which?state?mentistrue??mentintheDATAstepcause?sasynta?xerror?.?mentPayro?ll+(Month?lyWag?eRate?*12);inthedatastepcause?sasynta?xerror?.?softhevaria?blePayro?llrepre?sentthemonth?lytotal?foreachdepar?tment???softhevaria?blePayro?llrepre?sentamonth?lytotal?forallvalue?sofWAGER???r:C-------------------------------------?wingSASprogr?amissubmi?tted:?L;Cost='$20,000';Disco?unt=.10*Cost;run;Whatistheresul?t??ofthevaria?bleDisco?untintheoutpu??gesarewritt??ofthevaria?bleDisco?untintheoutpu??rsion?hastaken?place?iswritt??ofthevaria?bleDisco?untintheoutpu?tdatasetismissi??stoinval?idnumer??bleDisco?untintheoutpu??gesarewritt??r:C因为有一个?$符号-------------------------------------?theexist?ingSASprogr?am:procforma?t;value?agegr?plow-12='Pre-Teen'13-high='Teen';run;procmeans?data=SASHE??;varHeigh?t;class?SexAge;forma?tAgeagegr?p.;run;Which?state?mentintheprocmeans?stepneeds?tobemodif?iedoradded?togener?atethefollo?wingresul?ts:Analy?sisVaria?ble:Heigh?tNSexAgeObsMinim?umMaxim?umMean------------------------------------------------------------------FPre----------------------------------------------------------------------?t/nobsminmaxmeanmaxde?c=1;?data=SASHE??maxde?c=1;?data=SASHE??minmaxmeanmaxde?c=1;?tnobsminmaxmeanmaxde?c=1;Answe?r:C-------------------------------------?workb??insthefollo?wingthree?works?heets?:JANFEBMARWhich?state?mentcorre?ctlyassig?nsalibra?ryrefer?encetotheExcel?workb?ook??meqtrda?ta'';?me''sheet?s=3;?mejanfebmar'';?memydat?a''?=(jan,feb,mar);Answe?r:A-------------------------------------?wingSASprogr?amissubmi?tted:;?ES(keep=Janpt?Febpt?Marpt?);array?Diff{3}Difco?unt1-Difco?unt3;array?Patie?nts{3}Janpt?Febpt?Marpt?;run;Whatnewvaria?blesarecreat?ed??unt1,Difco?unt2andDifco??,Diff2?andDiff3??,Febpt?,andMarpt??nts1,Patie?nts2andPatie?nts3Answe?r:A-------------------------------------?ofthefollo?wingprogr?amscorre?ctlyinvok?estheDATAStepDebug?ger:?;?S;State?=scan(cityS?tate,2,'');ifState?='NE'thendescr?iptio?n='Centr?al';run;?ger;?S;State?=scan(cityS?tate,2,'');ifState?='NE'thendescr?iptio?n='Centr?al';run;?;?S;State?=scan(cityS?tate,2,'');ifState?='NE'thendescr?iptio?n='Centr?al';run;?ger;?S;State?=scan(cityS?tate,2,'');ifState?='NE'thendescr?iptio?n='Centr?al';run;Answe?r:c-------------------------------------?state?mentistrueconce?rning?theSASautom?aticvaria?ble_ERRO?R_??tbeusedinanif/thencondi??tbeusedinanassig?nment?state??mentorkeep=optio??atica?llydropp??r:D-------------------------------------?wingSASprogr?amissubmi?tted:?INFO;X='04jul?2005'd;DayOf?Month?=day(x);Month?OfYea?r=month?(x);Year=year(x);run;Whattypes?ofvaria?blesareDayOf?Month?,Month?OfYea?r,andYear??Month?,Year,andMonth?OfYea?rarechara??Month?,Year,andMonth?OfYea?rarenumer??Month?andYeararenumer??OfYea?rischara??Month?,Year,andMonth?OfYea?raredatevalue??r:B-------------------------------------?thefollo?wingdatastep:;infil?edatal?ines;input?City$20.;ifCity='Tulsa?'thenState?='OK';Regio?n='Centr?al';ifCity='LosAngel?es'thenState?='CA';Regio?n='Weste?rn';datal?ines;Tulsa?LosAngel?esBango?r;run;After?datastepexecu?tion,?in??Regio?n-----------------------Tulsa?OKWeste?rnLosAngel?esCAWeste?rnBango?rWeste??Regio?n-----------------------Tulsa?OKWeste?rnLosAngel?esCAWeste?rnBango??Regio?n-----------------------Tulsa?OKCentr?alLosAngel?esCAWeste?rnBango?rWeste??Regio?n-----------------------Tulsa?OKCentr?alLosCAWeste?rnBango?rAnswe?r:A-------------------------------------?state?mentdescr?ibesachara?cteri?sticoftheSASautom?aticvaria?ble_ERRO?R_??R_varia?blemaint?ainsacount?ofthenumbe?rofdataerror??R_varia?bleisadded?totheprogr?amdatavecto??espartofthedatasetbeing?creat??R_varia?blecanbeusedinexpre?ssion??R_varia?bleconta?insthenumbe?roftheobser?vatio?nthatcause?dthedataerror?.Answe?r:C-------------------------------------?insanumer?icvaria?blenamed?Numandachara?ctervaria?blenamed?Char:-------123323177Thefollo?wingSASprogr?amissubmi?tted:procprint?data=;where?Num='1';run;Whatisoutpu?t?-------123

SASbase考试必备70真题(附答案) 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数42
  • 收藏数0 收藏
  • 顶次数0
  • 上传人86979448
  • 文件大小155 KB
  • 时间2024-04-22