認(rèn)證考試70真題答案詳解_第1頁(yè)
認(rèn)證考試70真題答案詳解_第2頁(yè)
認(rèn)證考試70真題答案詳解_第3頁(yè)
認(rèn)證考試70真題答案詳解_第4頁(yè)
認(rèn)證考試70真題答案詳解_第5頁(yè)
已閱讀5頁(yè),還剩35頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、SAS Base認(rèn)證考試70題SAS分多個(gè)認(rèn)證種類(lèi):base,advanced,clinic等,但大多需要先通過(guò)base認(rèn)證。但凡這類(lèi)商業(yè)組織提供的考證,基本都是題庫(kù)型,所以想考過(guò)難度并不大。對(duì)于只想拿SAS認(rèn)證的人,如果熟練掌握網(wǎng)上流傳甚廣的sas真題70題,通過(guò)base認(rèn)證基本就沒(méi)問(wèn)題。Q 11. The following SAS program is submitted:data WORK.TOTAL;set WORK.SALARY;by Department Gender;if First.<_insert_code_> then Payroll=0; Payroll+W

2、agerate;if Last.<_insert_code_>run;The SAS data set WORK.SALARY is currently ordered by Gender within Department.Which inserted code will accumulate subtotals for each Gender within Department?A. GenderB. DepartmentC. Gender DepartmentD. Department Gender答案:A本題知識(shí)點(diǎn):自動(dòng)變量在SAS讀取數(shù)據(jù)時(shí),在PDV過(guò)程中會(huì)產(chǎn)生很多自動(dòng)變

3、量,在輸出的數(shù)據(jù)集中是不可見(jiàn)的。· FIRST.VARIABLE:同一個(gè)BY變量(組),若新的變量值第一次出現(xiàn)時(shí),其first.variable值為1。· LAST.VARIABLE:同一個(gè)BY變量(組),若新的變量值最后一次出現(xiàn)時(shí),其last.variable值為1。另外,在BY變量右面有多個(gè)變量時(shí),先按第一個(gè)變量排序,若第一個(gè)變量的觀(guān)測(cè)存在重復(fù)時(shí),才按第二個(gè)變量排序。Q 2Given the following raw data records in TEXTFILE.TXT: -|-10-|-20-|-30 John,FEB,13,25,14,27,Final Joh

4、n,MAR,26,17,29,11,23,Current Tina,FEB,15,18,12,13,Final Tina,MAR,29,14,19,27,20,CurrentThe following output is desired:Obs Name Month Status Week1 Week2 Week3 Week4 Week5 1 John FEB Final $13 $25 $14 $27 . 2 John MAR Current $26 $17 $29 $11 $23 3 Tina FEB Final $15 $18 $12 $13 . 4 Tina MAR Current $

5、29 $14 $19 $27 $20Which SAS program correctly produces the desired output?A. data WORK.NUMBERS;length Name $ 4 Month $ 3 Status $ 7;infile 'TEXTFILE.TXT' dsd;input Name $ Month $;if Month='FEB' then input Week1 Week2 Week3 Week4 Status $;else if Month='MAR' then input Week1 W

6、eek2 Week3 Week4 Week5 Status $;format Week1-Week5 dollar6.;run;proc print data=WORK.NUMBERS;run;B. data WORK.NUMBERS;length Name $ 4 Month $ 3 Status $ 7;infile 'TEXTFILE.TXT' dlm=',' missover;input Name $ Month $;if Month='FEB' then input Week1 Week2 Week3 Week4 Status $;el

7、se if Month='MAR' then input Week1 Week2 Week3 Week4 Week5 Status $;format Week1-Week5 dollar6.;run;proc print data=WORK.NUMBERS;run;C. data WORK.NUMBERS;length Name $ 4 Month $ 3 Status $ 7;infile 'TEXTFILE.TXT' dlm=','input Name $ Month $ ;if Month='FEB' then input

8、Week1 Week2 Week3 Week4 Status $;else if Month='MAR' then input Week1 Week2 Week3 Week4 Week5 Status $;format Week1-Week5 dollar6.;run;proc print data=WORK.NUMBERS;run;D. data WORK.NUMBERS;length Name $ 4 Month $ 3 Status $ 7;infile 'TEXTFILE.TXT' dsd ;input Name $ Month $;if Month=&

9、#39;FEB' then input Week1 Week2 Week3 Week4 Status $;else if Month='MAR' then input Week1 Week2 Week3 Week4 Week5 Status $;format Week1-Week5 dollar6.;run;proc print data=WORK.NUMBERS;run;答案:C本題知識(shí)點(diǎn):INFILE語(yǔ)句與指示器、INFILE filespecification options;其中,filespecification用來(lái)定義文件, options給出選擇項(xiàng);

10、83; filespecification有以下三種形式:、fileref(文件標(biāo)志)、filename(文件名)、CARDS指明輸入的數(shù)據(jù),緊跟著CARDS語(yǔ)句· 下列選擇項(xiàng)(options)可以出現(xiàn)在INFILE語(yǔ)句中:、COLUMN=variable或COL=variable 定義一個(gè)變量, 其值是指針?biāo)诘漠?dāng)前列位置。、END=variable 定義一個(gè)變量, 作為文件結(jié)束的標(biāo)志。、EOF=label是一個(gè)語(yǔ)句標(biāo)號(hào), 當(dāng)INFILE語(yǔ)句讀到文件末尾時(shí), 作為隱含的GOTO語(yǔ)句的目標(biāo)。、LENGHT=variable 定義一個(gè)變量, 其值是當(dāng)前輸入數(shù)據(jù)行的長(zhǎng)度。、FIRSTOB

11、S=linenumber 要求從指定的行開(kāi)始讀取數(shù)據(jù), 而不是從文件的第一個(gè)記錄開(kāi)始。、OBS=n 指定從一個(gè)順序輸入文件中讀取數(shù)據(jù)的最后一個(gè)行(即第1第n行)。一個(gè)觀(guān)察可能占n行。、DLM= 若分隔符不是空格,則使用DLM=指定、DSD 忽略引號(hào)中數(shù)值的分隔符;自動(dòng)將字符數(shù)據(jù)中的引號(hào)去掉;將兩個(gè)相鄰分隔符視為缺失值處理。、MISSOVER 阻止INPUT進(jìn)入下一行讀取,未賦值變量視為缺失值。、TRUNCOVER 與MISSOVER相似,但在COLUMN INPUT或FORMATTED INPUT中使用。比較 與 的區(qū)別:· 用于1個(gè)數(shù)據(jù)行用多個(gè)input語(yǔ)句讀取,停留到下一個(gè)INP

12、UT語(yǔ)句。· 用于1個(gè)數(shù)據(jù)行含有多個(gè)觀(guān)測(cè)值讀取時(shí),停留到下一個(gè)DATA步。Q 3The following SAS program is submitted:data WORK.DATE_INFO; Day="01" ; Yr=1960 ; X=mdy(Day,01,Yr) ;run;What is the value of the variable X?A. the numeric value 0B. the character value "01011960"C. a missing value due to syntax errorsD.

13、 the step will not compile because of the character argument in the mdy function.答案:A本題知識(shí)點(diǎn):數(shù)據(jù)類(lèi)型的自動(dòng)轉(zhuǎn)換在SAS中,日期時(shí)間是以1960年1月1日0時(shí)0分0秒作為起點(diǎn)的。因此,mdy(1,1,1960)=0。若把日期時(shí)間表示為常數(shù)時(shí),要使用相應(yīng)的格式,帶單或雙引號(hào),在后面緊跟一個(gè)D(日期)、T(時(shí)間)、DT(日期時(shí)間)。在本題中,日期函數(shù)的參數(shù)應(yīng)該是數(shù)值,若是字符串,會(huì)先嘗試字符串是否可以轉(zhuǎn)換為數(shù)值,這是自動(dòng)轉(zhuǎn)換。自動(dòng)轉(zhuǎn)換是指系統(tǒng)產(chǎn)生一個(gè)臨時(shí)的變量來(lái)完成賦值或運(yùn)算。當(dāng)自動(dòng)轉(zhuǎn)換發(fā)生時(shí),會(huì)在LOG窗口中

14、給出提示。1)、字符型變量 -> 數(shù)值型變量在下面的情況中,VarB是一個(gè)字符型變量,其它是數(shù)字型變量。· 賦值于一個(gè)數(shù)字型變量,如:VarA=VarB;· 在算術(shù)運(yùn)算中使用,如:VarA=VarB+0;· 與一個(gè)數(shù)字型變量進(jìn)行比較,如:if VarB>=VarA;· 在函數(shù)中,參數(shù)要求數(shù)字型變量,如:VarA=sum(VarB,0);2)、數(shù)值型變量 -> 字符型變量在下面的情況中,VarB是一個(gè)數(shù)字型變量,其它是字符型變量。· 賦值于一個(gè)字符型變量,如:VarA=VarB;· 在與要求字符的運(yùn)算符一起使用,如:V

15、arA=''|VarB;· 在函數(shù)中,參數(shù)要求字符型變量,如:VarA=trim(VarB);Q 4The Excel workbook REGIONS.XLS contains the following four worksheets: EAST WEST NORTH SOUTHThe following program is submitted:libname MYXLS 'regions.xls'Which PROC PRINT step correctly displays the NORTH worksheet?A. proc print

16、data=MYXLS.NORTH;run;B. proc print data=MYXLS.NORTH$;run;C. proc print data=MYXLS.'NORTH'e;run;D. proc print data=MYXLS.'NORTH$'n;run;答案:D本題知識(shí)點(diǎn):打印Excel的某個(gè)工作表的數(shù)據(jù)WHAT IS THAT “$” CHARACTER? Looking at SAS Explorer it may be surprising that each dataset written to Excel appears twice, o

17、nce with the expected name and once with a trailing “$”. Unlike a typical data source, data in an Excel spreadsheet need not be left and top aligned. For this Excel has named ranges which allow data to be placed anywhere inside a spreadsheet. By default SAS reads and writes data from named ranges on

18、 spreadsheets, but will also read spreadsheet data directly in the absence of a named range. When a new SAS dataset is created in an Excel library, SAS creates both a spreadsheet and a named range. Each is given the same name, with thespreadsheet denoted by a trailing “$”. In the example at right CL

19、ASS is the named range created by the Excel engine and CLASS$ is the spreadsheet created by the Excel engine to hold the named range. Within SAS, the named range is referred to as Wrkbk.CLASS, and the spreadsheet is referenced using the name literal Wrkbk.CLASS$n. SAS name literals are name tokens w

20、ritten as strings within quotation marks, followed by the letter n. Name literals allow the use of special characters that are not otherwise allowed in SAS names , like the “$” used by the Excel libname engine to distinguish worksheets from named ranges. For more information see the Recommended Read

21、ings.摘自De-Mystifying the SAS LIBNAME Engine in Microsoft Excel: A Practical GuideQ 5Which statement specifies that records 1 through 10 are to be read from the raw data file customer.txt?A. infile 'customer.txt' 1-10;B. input 'customer.txt' stop10;C. infile 'customer.txt' obs

22、=10;D. input 'customer.txt' stop=10; 答案:C本題知識(shí)點(diǎn):INFILE的選項(xiàng)FIRSTOBS=常數(shù),要求從指定的行開(kāi)始讀取數(shù)據(jù), 而不是從文件的第一個(gè)記錄開(kāi)始。OBS=常數(shù),指定從一個(gè)順序輸入文件中讀取數(shù)據(jù)的最后一個(gè)行(即第1第n行)。一個(gè)觀(guān)測(cè)可能占n行。Q 6After a SAS program is submitted, the following is written to the SAS log: 101 data WORK.JANUARY; 102 set WORK.ALLYEAR(keep=product month num_S

23、old Cost); 103 if Month='Jan' then output WORK.JANUARY; 104 Sales=Cost * Num_Sold; 105 keep=Product Sales; - 22 ERROR 22-322: Syntax error, expecting one of the following: !, !, &, *, *, +, -, , <=, <>, =, >, >=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR

24、, =, |, |, =.106 run;What changes should be made to the KEEP statement to correct the errors in the LOG?A. keep=(Product Sales);B. keep Product, Sales;C. keep=Product, Sales;D. keep Product Sales;答案:D本題知識(shí)點(diǎn):KEEP語(yǔ)句與KEEP=選項(xiàng)在處理大型數(shù)據(jù)集時(shí),KEEP=選項(xiàng)的效率較高。· KEEP語(yǔ)句:KEEP variable(s); 不能用于過(guò)程步。· KEEP=選項(xiàng):da

25、ta-set-name( KEEP=variable(s) ) 可以用于數(shù)據(jù)步(如,DATA語(yǔ)句、SET語(yǔ)句)、過(guò)程步。其中,variable(s)是具體變量,不能是數(shù)組、_N_、_ERROR_等。Q 7Which of the following choices is an unacceptable ODSdestination for producing output that can be viewed in Microsoft Excel?A. MSOFFICE2KB. EXCELXPC. CSVALLD. WINXP答案:D本題知識(shí)點(diǎn):ODS輸出Most of these desti

26、nations are designed to create output for viewing on a screen or for printing.The OUTPUT destination creates SAS data sets. The MARKUP destination is a general purposetool for creating output in formats defined by tagsets. This includes XML (eXtensible MarkupLanguage), EXCELXP, LaTeX, CSV (comma-sep

27、arated values), and many other formats where datacan be thought of as separated by tags. The DO CUMENT destination, on the other hand, allowsyou to create a reusable output “document” that yo u can rerender for any destination. So, if yourboss decides he really wants that report in PDF, not RTF, you

28、 can replay the output documentwithout having to rerun the entire SAS program that created the data. With an output document,you can also rearrange, duplicate, or delete tables to further customize your output.摘自The Little SAS Book(Fourth) P152頁(yè)Q 8The SAS data set named WORK.SALARY contains 10 obser

29、vations for each department, and is currently ordered by Department.The following SAS program is submitted:data WORK.TOTAL;set WORK.SALARY(keep=Department MonthlyWageRate);by Department;if First.Department=1 then Payroll=0; Payroll+(MonthlyWageRate*12);if Last.Department=1;run;Which statement is tru

30、e?A. The by statement in the DATA step causes a syntax error.B. The statement Payroll+(MonthlyWageRate*12); in the data step causes a syntax error.C. The values of the variable Payroll represent the monthly total for each department in the WORK.SALARY data set.D. The values of the variable Payroll r

31、epresent a monthly total for all values of WAGERATE in the WORK.SALARY data set.答案:C本題知識(shí)點(diǎn):類(lèi)似第1題Q 9data course;input exam;datalines;50.1;run;proc format;value score 1 50 = Fail 51 100 = Pass;run;proc report data =course nowd;column exam;define exam / display format=score.;run;What is the value for ex

32、am?A. FailB. PassC. 50.1D. No output答案:C本題知識(shí)點(diǎn):PROC FORMAT語(yǔ)句PROC FORMAT;VALUE namerange-1=formatted-text-1;range-2=formatted-text-2;range-n=formatted-text-n;若name為字符串設(shè)計(jì)格式,則必須在開(kāi)頭加$,長(zhǎng)度不超過(guò)32字節(jié);name不能以數(shù)字結(jié)尾,除了下劃線(xiàn)外,不能含其他的任何特殊字符。在range右側(cè)文本可達(dá)到32767字節(jié)。· 變量值是字符串要加引號(hào)。· range是多個(gè)值,要用逗號(hào)。· 連續(xù)的要用-。

33、83; 關(guān)鍵字low、high指代變量中最小和最大的非缺失值。· 用 < 排除或指代某些范圍。· other是給其他沒(méi)列在VALUE中的變量分配格式。Q 10The following SAS program is submitted:data WORK.RETAIL; Cost='$20.000' Discount=.10*Cost;run;What is the result?A. The value of the variable Discount in the output data set is 2000. No messages are w

34、ritten to the SAS log.B. The value of the variable Discount in the output data set is 2000. A note that conversion has taken place is written to the SAS log.C. The value of the variable Discount in the output data set is missing. A note in the SAS log refers to invalid numeric data.D. The variable D

35、iscount in the output data set is set to zero. No messages are written to the SAS log.答案:C本題知識(shí)點(diǎn):標(biāo)準(zhǔn)數(shù)據(jù)、以及數(shù)據(jù)類(lèi)型的自動(dòng)轉(zhuǎn)換非標(biāo)準(zhǔn)數(shù)據(jù)· 含逗號(hào)的數(shù)值,如:1,00,001;· 包含美元符號(hào)、十六進(jìn)制、壓縮十進(jìn)制的數(shù)據(jù);· 日期是最普通的非標(biāo)準(zhǔn)數(shù)據(jù)。標(biāo)準(zhǔn)數(shù)據(jù)· 數(shù)字0-9· 英文句號(hào)· 科學(xué)計(jì)數(shù)、E· +、-如果字符型變量轉(zhuǎn)換后不能作為標(biāo)準(zhǔn)數(shù)值讀入,被轉(zhuǎn)換成的字符型變量有格式要求,必須進(jìn)行顯式轉(zhuǎn)換。Q 11Given the

36、existing SAS program:     proc format;        value agegrp           low-12 ='Pre-Teen'           13-high = 'Teen'  

37、60;  run;     proc means data=SASHELP.CLASS;        var Height;        class Sex Age;        format Age agegrp.;     run;Which statement in the proc m

38、eans step needs to be modified or addedto generate the following results:                     Analysis Variable : Height            

39、60;       N   Sex  Age         Obs       Minimum         Maximum            Mean 

40、0; -   F    Pre-Teen      3          51.3            59.8            55.8   

41、0;    Teen          6          56.5            66.5            63.0   M

42、0;   Pre-Teen      4          57.3            64.8            59.7        T

43、een          6          62.5            72.0            66.8   -A. var Height / nobs min m

44、ax mean maxdec=1;B. proc means data=SASHELP.CLASS maxdec=1 ;C. proc means data=SASHELP.CLASS min max mean maxdec=1;D. output nobs min max mean maxdec=1;答案:C 本題知識(shí)點(diǎn):PROC MEANS過(guò)程PROC MEANS <options> <statistic-keywords>語(yǔ)句;RUN;· <options>data=:數(shù)據(jù)集maxdec=:指定輸出結(jié)果的小數(shù)位數(shù),默認(rèn)為7位nopr

45、int:禁止結(jié)果在OTPUT窗口輸出alpha:設(shè)定可信區(qū)間的水平,默認(rèn)為0.05· <statistic-keywords>MAX、MIN、MEAN、MEDIAN、N、NMISS、RANGE、STDDEV、SUM若不加統(tǒng)計(jì)關(guān)鍵詞,默認(rèn)打印的順序:非缺失值個(gè)數(shù)(N)、均值(MEAN)、標(biāo)準(zhǔn)差(STDDEV)、最小值(MIN)、最大值(MAX)。·  語(yǔ)句若在PROC MEAN過(guò)程中沒(méi)有其他語(yǔ)句,默認(rèn)輸出所有觀(guān)測(cè)值和所有數(shù)值變量的統(tǒng)計(jì)量。BY:分變量單獨(dú)分析,數(shù)據(jù)必須先按變量順序排序,即PROC SORTCLASS:分變量單獨(dú)分析,不用排序VAR:指定使

46、用的數(shù)值變量 Q 12The Excel workbook QTR1.XLS contains thefollowing three worksheets:    JAN     FEB     MARWhich statement correctly assigns a library reference to the Excel workbook?A. libname qtrdata 'qtr1.xls'B. libname 'qtr1.xls&#

47、39; sheets=3;C. libname jan feb mar 'qtr1.xls'D. libname mydata 'qtr1.xls' WORK.heets=(jan,feb,mar);答案:A 本題知識(shí)點(diǎn):LIBNAME語(yǔ)句格式LIBNAME libref <engine> SAS-data-library < options > <engine/host-options> Q 13The following SAS program is submitted:&

48、#160;data WORK.TEST;    set WORK.MEASLES(keep=Janpt Febpt Marpt);    array Diff3  Difcount1-Difcount3;    array Patients3 Janpt Febpt Marpt; run;What new variables are created?A. Difcount1, Difcount2 and Difcount3B. Diff1, Diff2 and Diff3C. Janp

49、t, Febpt, and MarptD. Patients1, Patients2 and Patients3答案:A 本題知識(shí)點(diǎn):數(shù)組與其他編程語(yǔ)言的數(shù)組相比不同在于,SAS數(shù)組的每個(gè)元素都對(duì)應(yīng)一個(gè)變量名。· 數(shù)值型數(shù)組數(shù)組說(shuō)明中的初始值可省略,默認(rèn)為缺失值。數(shù)組說(shuō)明中變量可省略,變量名默認(rèn)為數(shù)組名+序號(hào)。序號(hào)從1開(kāi)始。ARRAY test(3) Math Chinese English (0,0,0);數(shù)組元素的個(gè)數(shù)由變量個(gè)數(shù)決定。ARRAY test(*) test3-test8;二維數(shù)組,數(shù)組元素按行排列。ARRAR x(2,2) x11 x12 x21

50、 x22;· 字符型數(shù)組字符型數(shù)組藥指定數(shù)組元素的最大長(zhǎng)度,其他與數(shù)值型數(shù)組相同。ARRAY test(2) $ 10 mathor father;· 臨時(shí)數(shù)組若SAS數(shù)組每個(gè)元素不對(duì)應(yīng)變量名,即為臨時(shí)數(shù)組。這與其他編程語(yǔ)言相同。ARRAY test(3) _TEMPORARY_ (0,0,0);臨時(shí)數(shù)組只用于中間計(jì)算,不保存入數(shù)據(jù)集。在數(shù)據(jù)步中,臨時(shí)數(shù)組在數(shù)據(jù)步隱含循環(huán)中能自動(dòng)保留上一步得到的值。 Q 14Which of the following programs correctly invokes the DATA Step Debugger:A. dat

51、a WORK.TEST debug;   set WORK.PILOTS;   State=scan(cityState,2,' ');   if State='NE' then description='Central'run;B. data  WORK.TEST debugger;      set WORK.PILOTS;   State=scan(cityState,2,' ');&#

52、160;  if State='NE' then description='Central'run;C. data WORK.TEST / debug;      set WORK.PILOTS;   State=scan(cityState,2,' ');   if State='NE' then description='Central'run;D. data  WORK.TEST / debugger

53、;   set WORK.PILOTS;   State=scan(cityState,2,' ');   if State='NE' then description='Central'run;答案:C 本題知識(shí)點(diǎn): / debug 語(yǔ)法DEBUG過(guò)程的調(diào)用方法:在DATA步后面增加DEBUG選項(xiàng)。 Q 15Which statement is true concerning the SAS automatic variable _ERROR_?A. It

54、 cannot be used in an if/then condition.B. It cannot be used in an assignment statement.C. It can be put into a keep statement or keep= option.D. It is automatically dropped.答案:D 本題知識(shí)點(diǎn):自動(dòng)變量_ERROR_在PDV過(guò)程中,產(chǎn)生很多自動(dòng)變量,可以在數(shù)據(jù)步的表達(dá)式中使用,在輸出數(shù)據(jù)集中不可見(jiàn)。在PDV過(guò)程中,_N_、_ERROR_默認(rèn)為DROP。在KEEP語(yǔ)句或KEEP=選項(xiàng)中,可以使用除了_N_、_ER

55、ROR_之外的變量。 Q 16The following SAS program is submitted:data WORK.DATE_INFO;     X='04jul2005'd;     DayOfMonth=day(x);     MonthOfYear=month(x);     Year=year(x);run;What types of variables are DayOfMonth, Mo

56、nthOfYear, and Year?A. DayOfMonth, Year, and MonthOfYear are character.B. DayOfMonth, Year, and MonthOfYear are numeric.C. DayOfMonth and Year are numeric. MonthOfYear is character.D. DayOfMonth, Year, and MonthOfYear are date values.答案:B 本題知識(shí)點(diǎn):SAS中日期時(shí)間及函數(shù)起點(diǎn):1960年1月1日0時(shí)0分0秒。若將日期時(shí)間標(biāo)示為數(shù)值型常數(shù),需使用相應(yīng)

57、格式。格式值帶單引號(hào),后跟一個(gè)D(日期)、T(時(shí)間)、DT(日期時(shí)間)。日期函數(shù)返回值為數(shù)值。 Q 17Given the following data step:data WORK.GEO;     infile datalines;     input City $20.;     if City='Tulsa' then     State='OK'   &#

58、160; Region='Central'     if City='Los Angeles' then     State='CA'     Region='Western'datalines;TulsaLos AngelesBangor;run;After data step execution, what will data set WORK.GEO contain?A. City &#

59、160;         State   Region     -    -   -     Tulsa          OK      Western     Los Angeles&#

60、160;   CA      Western     Bangor                 WesternB. City           State   Region  

61、;   -    -   -     Tulsa          OK      Western     Los Angeles    CA      Western     Bangor

62、C. City           State   Region    -    -   -    Tulsa          OK      Central     Los A

63、ngeles    CA      Western     Bangor                 WesternD. City           State   Region

64、60;   -    -   -    Tulsa          OK      Central    Los            CA      Western&

65、#160;   Bangor答案:A 本題知識(shí)點(diǎn):IF語(yǔ)句若執(zhí)行語(yǔ)句不能在一個(gè)語(yǔ)句完成,則使用復(fù)合語(yǔ)句DO和END IF 條件 THEN 語(yǔ)句;沒(méi)有ENDIF,沒(méi)有IF-ELSEIF-ELSE多分支結(jié)構(gòu),語(yǔ)句1只能是一個(gè)語(yǔ)句。IF 條件 THEN 語(yǔ)句1;<ELSE 語(yǔ)句2>; Q 18Which statement describes a characteristic of the SAS automatic variable _ERROR_?A. The _ERROR_ variable maintains a count of

66、 the number of data errors in a DATA step.B. The _ERROR_ variable is added to the program data vector and becomes part of the data set being created.C. The _ERROR_ variable can be used in expressions in the DATA step.D. The _ERROR_ variable contains the number of the observation that caused the data

67、 error.答案:C 本題知識(shí)點(diǎn):WHERE語(yǔ)句類(lèi)似第15題。 Q 19The SAS data set WORK.ONE contains a numeric variable named Num and a character variable named Char:  WORK.ONE  Num   Char  -   -    1   23    3   23   

68、1   77The following SAS program is submitted:proc print data=WORK.ONE;     where Num='1'run;What is output?A. Num   Char     -   -     1     23B. Num   Char 

69、       -   -    1     23    1     77C. Num   Char         -   -     1     23 

70、60;   3     23     1     77D. No output is generated.答案:D 本題知識(shí)點(diǎn):WHERE語(yǔ)句WHERE語(yǔ)句無(wú)法找到滿(mǎn)足條件的觀(guān)測(cè)。 Q 20The data set WORK.REALESTATE has the variable LocalFee with a format of 9. and a variable CountryFee with a format of 7.;

71、0;The following SAS program is submitted:data WORK.FEE_STRUCTURE;     format LocalFee CountryFee percent7.2;     set WORK.REALESTAT;     LocalFee=LocalFee/100;     CountryFee=CountryFee/100;run;What are the formats of the variables LOCALFEE and COUNTRYFEE in the output dataset?A. LocalFee has format of 9. and CountryFee has a format of 7.B. LocalFee has format of 9. and CountryFee has a format of percent7.2C. Both LocalFee and CountryFee have a format of percent7.2D. The data step fails execution; there is n

溫馨提示

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

最新文檔

評(píng)論

0/150

提交評(píng)論