1、3/3/2015 (109)QUESTION 109 The contents of the raw data file EMPLOYEE are listed below:-|-10-|-20-|-30 Ruth 39 11 Jose 32 22 Sue 30 33 John 40 44 The following SAS program is submitted:data test;in file employee;input employee_ name$1-4;if employee_ name=Sue then input age 7-8;else input idnum 10-11
2、;run;Which one of the following values does the variable AGE contain when the name of the employee is Sue?A.30 B.33 C.40 D.(missing numeric value)QUESTION 110 The contents of the raw data file EMPLOYEE are listed below:-|-10-|-20-|-30 Ruth 39 11 Jose 32 22 Sue 30 33 John 40 44 The following SAS prog
3、ram is submitted:data test;in file employee;input employee_ name$1-4;if employee_ name=Ruthh then input idnum 10-11;else input age 7-8;run Which one of the following values does the variable IDNUM contain when the name of the employee is Ruth?A.11 B.22(33)C.32 D.(missing numeric value)Answer:B 机经:正如
4、各位前辈所言,70 以及变形一定要看。今天考到的有:4,13,16,17,20,21(gt 50),22,24,30,31,32,34,35(output 变为 else output),40(do while(prod le 6)改为(do until(prod gt 6),42(变为填空,US 放在了最前面),46,47,51,53,56,57,60,61,63,65,66(在第一个 end 后面加了 output,求 X 值),67(if X10 then X=1改为 X=3),69,70(题目改为根据 log 内容,判断错误内容)70 题的变型全部考到,全新题在 7-8 题 1)The
5、 following SAS program is submitted:data WORK.TOTAL;set WORK.SALARY;by Department Gender;if First.then Payroll=0;Payroll+Wagerate;if Last.;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
6、?A.Gender _insert_code_ _insert_code_ B.Department C.Gender Department D.Department Gender Answer:A 18.Which statement describes a characteristic of the SAS automatic variable _ERROR_?A.The _ERROR_ variable maintains a count of the number of data errors in a DATA step.B.The _ERROR_ variable is added
7、 to the program data vector and becomes part of the data set being created.C.The _ERROR_ variable can be only used in expressions in the DATA step.D.The _ERROR_ variable contains the number of the observation that caused the data error.Answer:C 9)The following SAS program is submitted:proc format;va
8、lue score 1-50=Fail 51-100=Pass;run;proc report data=work.courses nowd;column exam;define exam/display format=score.;run;The variable EXAM has a value of 50.5.How will the EXAM variable value be displayed in the REPORT procedure output?A.Fail B.Pass C.50.5 D.(missing numeric value)答案:C 19)TheSAS dat
9、a set WORK.ONE contains a numeric variable named Num and a character variable named Char:WORK.ONE Num Char -1 23 3 23 1 77 The following SAS program is submitted:proc print data=WORK.ONE;where Num=1;Num=contain(1);没 contain 这个函数 run;What is output?A.Num Char -1 23 B.Num Char -1 23 1 77 C.Num Char -1
10、 23 3 23 1 77 D.No output is generated.Answer:D(num+char,where statment can not work)21)Given the SAS data set WORK.PRODUCTS:ProdId Price ProductType Sales Returns -K12S 95.50 OUTDOOR 15 2 B132S 2.99 CLOTHING 300 10 R18KY2 51.99 EQUIPMENT 25 5 3KL8BY 6.39 OUTDOOR 125 15 DY65DW 5.60 OUTDOOR 45 5 DGTY
11、23 34.55 EQUIPMENT 67 2 The following SAS program is submitted:data WORK.OUTDOOR WORK.CLOTH WORK.EQUIP;set WORK.PRODUCTS;if Sales GT 50;if ProductType EQ OUTDOOR then output WORK.OUTDOOR;else if ProductType EQ CLOTHING then output WORK.CLOTH;else if ProductType EQ EQUIPMENT then output WORK.EQUIP;ru
12、n;How many observations does the WORK.OUTDOOR data set contain?A.1 B.2 C.3 D.6 Answer:B 27.Given the SAS data set WORK.TEMPS:Day Month Temp -1 May 75 15 May 70 15 June 80 3 June 76 2 July 85 14 July 89 The following program is submitted:proc sort data=WORK.TEMPS;by descending Month Day by day descen
13、ding Month;run;proc print data=WORK.TEMPS;run;Which output Is correct?33)The following SAS program is submitted:data WORK.TEST;set WORK.PILOTS;if Jobcode=Pilot2 then Description=Senior Pilot;else Description=Unknown;run;The value for the variable Jobcode is:PILOT2.What is the value of the variable D
14、escription?A.PILOT2 B.Unknown C.Senior Pilot D.(missing character value)Answer:B 35)x y 5 2 1 3 5 6 题目改成了,if x=5 then output one;if y lt 5 then output two;else output other;How many observations in each dataset?答案是 2 for one,2 for two,1 for other.35)given the SAS data set SASDATA.TWO:X Y -5 2 3 1 5
15、6 The following SAS program is submitted:data SASUSER.ONE SASUSER.TWO OTHER;set SASDATA.TWO;if X eq 5 then output SASUSER.ONE;if Y lt 5 then output SASUSER.TWO;else output;run;What is the result?A.data set SASUSER.ONE has 5 observations data set SASUSER.TWO has 5 observations data set WORK.OTHER has
16、 3 observations B.data set SASUSER.ONE has 2 observations data set SASUSER.TWO has 2 observations data set WORK.OTHER has 1 observations C.data set SASUSER.ONE has 2 observations data set SASUSER.TWO has 2 observations data set WORK.OTHER has 5 observations D.No data sets are output.The DATA step fails execution due to syntax errors.Answer:A 36)Given the contents of the raw data file EMPLOYEE.TXT:-+-10-+-20-+-30-Xing 19 2 2004 ACCT Bob 5 22 2004 MKTG Jorge 3 14 2004 EDUC The following SAS progra
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1