<P>其中BASE部分考试大纲要求:<BR>SAS Base Programming Exam<BR>Accessing Data <BR>Use FORMATTED, LIST and COLUMN input to read raw data files <BR>Use INFILE statement options to control processing when reading raw data files <BR>Use various components of an INPUT statement to process raw data files including column and line pointer controls, and trailing @ controls <BR>Combine SAS data sets using the DATA step</P>
<P>Creating Data Structures <BR>Create temporary and permanent SAS data sets <BR>Create and manipulate SAS date values <BR>Use DATA Step statements to export data to standard and comma delimited raw data files <BR>Control which observations and variables in a SAS data set are processed and output <BR>Managing Data <BR>Investigate SAS data libraries using base SAS utility procedures <BR>Sort observations in a SAS data set <BR>Conditionally execute SAS statements <BR>Use assignment statements in the DATA step <BR>Modify variable attributes using options and statements in the DATA step <BR>Accumulate sub-totals and totals using DATA step statements <BR>Use SAS functions to manipulate character data, numeric data, and SAS date values <BR>Use SAS functions to convert character data to numeric and vice versa <BR>Process data using DO LOOPS <BR>Process data using SAS arrays <BR>Generating Reports <BR>Generate list reports using the PRINT and REPORT procedures <BR>Generate summary reports and frequency tables using base SAS procedures <BR>Enhance reports through the use of labels, SAS formats, user-defined formats, titles, footnotes and SAS System reporting options <BR>Generate HTML reports using ODS statements <BR>Handling Errors <BR>Identify and resolve programming logic errors <BR>Recognize and correct syntax errors <BR>Examine and resolve data errors </P>
<P>本站提供BASE部分的模拟试题(至于阅读格式请自行调整)<BR>Quote <BR>The SAS Base Programming Exam is property of SAS Institute Inc. ("SAS") and may not be copied or<BR>disseminated without the prior written consent of SAS.<BR>SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other<BR>countries. ? indicates USA registration. Other brand and product names are trademarks of their respective companies. Copyright ? 2003 SAS Institute<BR>Inc. Cary, NC, USA. All rights reserved.<BR>SAS Certification: Base Programming Practice Exam<BR>1. A raw data file is listed below.<BR>----|----10---|----20---|----30<BR>son Frank 01/31/89<BR>daughter June 12-25-87<BR>brother Samuel 01/17/51<BR>The following program is submitted using this file as input.<BR>data work.family;<BR>infile file-specification;<BR><insert INPUT statement here><BR>run;<BR>Which INPUT statement correctly reads the values for the variable BIRTHDATE as SAS date values?<BR>A. input relation $ first_name $ birthdate date9.;<BR>B. input relation $ first_name $ birthdate mmddyy8.;<BR>C. input relation $ first_name $ birthdate : date9.;<BR>D. input relation $ first_name $ birthdate : mmddyy8.;<BR>SAS Certification: Base Programming Practice Exam Page 2 of 50<BR>2. The following SAS program is submitted:<BR>data work.areacodes;<BR>phonenumber = 3125551212;<BR>code = '('!!substr(phonenumber,1,3)!!')';<BR>run;<BR>Which one of the following is the value of the variable CODE in the output data set?<BR>A. ( 3)<BR>B. (312)<BR>C. 3<BR>D. 312<BR>SAS Certification: Base Programming Practice Exam Page 3 of 50<BR>3. The contents of the SAS data set SASDATA.GROUP is listed below:<BR>name age<BR>Janice 10<BR>Henri 11<BR>Michele 11<BR>Susan 12<BR>The following SAS program is submitted using the SASDATA.GROUP data set as input:<BR>libname sasdata 'SAS-data-library';<BR>data group;<BR>set sasdata.group;<BR>file 'file-specification';<BR>put name $15. @5 age 2.;<BR>run;<BR>Which one of the following describes the output created?<BR>A. a raw data file only<BR>B. a SAS data set named GROUP only<BR>C. both a SAS data set named GROUP and a raw data file<BR>D. Output is not created as the program fails to execute due to errors.<BR>SAS Certification: Base Programming Practice Exam Page 4 of 50<BR>4. Which of the following statements creates a numeric variable named IDNUMBER with a value of 4198?<BR>A. idnumber = 4198;<BR>B. idnumber = '4198';<BR>C. length idnumber = 8;<BR>D. length idnumber $ 8;<BR>SAS Certification: Base Programming Practice Exam Page 5 of 50<BR>5. Assume the SAS data set SASUSER.HOUSES contains four numeric variables.<BR>The following SAS program is submitted:<BR>proc means data = sasuser.houses mean;<BR><insert statement(s) here><BR>run;<BR>The following report is produced:<BR>The MEANS Procedure<BR>Style<BR>N<BR>Obs<BR>Variable<BR>Mean<BR>CONDO 4 bedrooms 2.7500000<BR>baths 2.1250000<BR>RANCH 4 bedrooms 2.2500000<BR>baths 2.0000000<BR>SPLIT 3 bedrooms 2.6666667<BR>baths 1.8333333<BR>TWOSTORY 4 bedrooms 3.0000000<BR>baths 1.8750000<BR>Which of the following generates the above report?<BR>A. class style;<BR>B. var bedrooms baths;<BR>C. class style;<BR>var bedrooms baths;<BR>D. var style;<BR>class bedrooms baths;<BR>SAS Certification: Base Programming Practice Exam Page 6 of 50<BR>6. A frequency report of the variable JOBCODE in the WORK.ACTORS data set is listed below:<BR>The FREQ Procedure<BR>Jobcode Frequency Percent Cumulative Cumulative<BR>Frequency Percent<BR>Actor I 2 33.33 2 33.33<BR>Actor II 2 33.33 4 66.67<BR>Actor III 2 33.33 6 100.00<BR>Frequency Missing = 1<BR>The following SAS program is submitted:<BR>data work.joblevels;<BR>set work.actors;<BR>if jobcode in ('Actor I', 'Actor II') then<BR>joblevel = 'Beginner';<BR>if jobcode = 'Actor III' then<BR>joblevel = 'Advanced';<BR>else<BR>joblevel = 'Unknown';<BR>run;<BR>Which of the following represents the possible values for the variable JOBLEVEL in the<BR>WORK.JOBLEVELS data set?<BR>A. Advanced and Unknown only<BR>B. Beginner and Advanced only<BR>C. Beginner, Advanced, and Unknown<BR>D. ' ' (missing character value)<BR>SAS Certification: Base Programming Practice Exam Page 7 of 50<BR>7. A raw data file is listed below:<BR>----|----10---|----20---|----30<BR>Jose,47,210<BR>Sue,,108<BR>The following SAS program is submitted using the raw data file above as input:<BR>data employeestats;<BR><insert INFILE statement here>;<BR>input name $ age weight;<BR>run;<BR>The following output is desired.<BR>name age weight<BR>Jose 47 210<BR>Sue . 108<BR>Which one of the following INFILE statements completes the program and accesses the data correctly?<BR>A. infile 'file-specification' dsd;<BR>B. infile 'file-specification' pad;<BR>C. infile 'file-specification' dlm = ',';<BR>D. infile 'file-specification' missover;<BR>SAS Certification: Base Programming Practice Exam Page 8 of 50<BR>8. The following SAS programs are submitted:<BR>data fltaten;<BR>input jobcode $ salary name $;<BR>cards;<BR>FLAT1 70000 Bob<BR>FLAT2 60000 Joe<BR>FLAT3 30000 Ann<BR>;<BR>run;<BR>data desc;<BR>set flatten;<BR>if salary > 60000 then<BR>description = ‘Over 60’;<BR>else<BR>description = ‘Under 60’;<BR>run;<BR>What is the value of the variable DESCRIPTION when the value for SALARY is 30000?<BR>A. Under 6<BR>B. Under 60<BR>C. Over 60<BR>D. “ “ (missing character value)<BR>SAS Certification: Base Programming Practice Exam Page 9 of 50<BR>9. The following report is generated:<BR>Style of homes<BR>n<BR>Asking price<BR>CONDO 4 $99,313<BR>RANCH 4 $68,575<BR>SPLIT 3 $77,983<BR>TWOSTORY 4 $83,825<BR>Which one of the following steps created the report?<BR>A. proc freq data = sasuser.houses;<BR>tables style price / nocum;<BR>format price dollar10.;<BR>label style = “Style of homes”<BR>price = “Asking price”;<BR>run;<BR>B. proc print data = sasuser.houses;<BR>class style;<BR>var price;<BR>table style,n price*mean*f=dollar10.;<BR>label style = “Style of homes”<BR>price = “Asking price”;<BR>run;<BR>C. proc means data = sasuser.houses n mean;<BR>class style;<BR>var price;<BR>format price dollar10.;<BR>label style = “Style of homes”<BR>price = “Asking price”;<BR>run;<BR>D. proc report data = sasuser.houses nowd headline;<BR>column style n price;<BR>define style / group label = Style of homes”;<BR>define price / mean format = dollar8.<BR>label = “Asking price”;<BR>run;<BR>SAS Certification: Base Programming Practice Exam Page 10 of 50<BR>10. A raw data record is listed below:<BR>----|----10---|----20---|----30<BR>$23,456 750<BR>The following SAS program is submitted using the raw data file as input:<BR>data bonus;<BR>infile 'file-specification';<BR>input salary $ 1 - 7 raise 9 - 11;<BR><insert statement here><BR>run;<BR>Which one of the following statements completes the program and adds the values of SALARY and<BR>RAISE to calculate the expected values of the NEWSALARY variable?<BR>A. newsalary = salary + raise;<BR>B. newsalary = put(salary,comma7.) + raise;<BR>C. newsalary = input(salary,comma7.) + raise;<BR>D. newsalary = put(salary,comma7.) + put(raise,3.);<BR>SAS Certification: Base Programming Practice Exam Page 11 of 50<BR>11. The SAS data set SASHELP.PRDSALE contains the variables REGION and SALARY with 4<BR>observations per REGION. SASHELP.PRDSALE is sorted primarily by REGION and within REGION<BR>by SALARY in descending order.<BR>The following SAS program is submitted:<BR>data one;<BR>set sashelp.prdsale;<BR>retain temp;<BR>by region descending salary;<BR>if first.region then<BR>do;<BR>temp = salary;<BR>output;<BR>end;<BR>if last.region then<BR>do;<BR>range = salary - temp;<BR>output;<BR>end;<BR>run;<BR>What is the number of observation(s) written to the output data set for each region?<BR>A. 0<BR>B. 1<BR>C. 2<BR>D. 4<BR>SAS Certification: Base Programming Practice Exam Page 12 of 50<BR>12. The following SAS program is submitted:<BR>data work.inventory;<BR>products = 7;<BR>do until (products gt 6);<BR>products + 1;<BR>end;<BR>run;<BR>What is the value of the variable PRODUCTS in the output data set?<BR>A. 5<BR>B. 6<BR>C. 7<BR>D. 8<BR>SAS Certification: Base Programming Practice Exam Page 13 of 50<BR>13. The following SAS program is submitted:<BR>data test;<BR>input country $8. date mmddyy10.;<BR>cards;<BR>Germany 12/31/2000<BR>France 01/32/2001<BR>;<BR>run;<BR>What is the value of the variable _ERROR_ when the variable _N_ has a value of 2?<BR>A. 0<BR>B. 1<BR>C. true<BR>D. false<BR>SAS Certification: Base Programming Practice Exam Page 14 of 50<BR>14. The following SAS program is submitted:<BR>data work.test;<BR>length city $20;<BR>city = 'Paris ';<BR>city2 = trim(city);<BR>run;<BR>Which of the following is the length of the CITY2 variable?<BR>A. 5<BR>B. 6<BR>C. 8<BR>D. 20<BR>SAS Certification: Base Programming Practice Exam Page 15 of 50<BR>15. A raw data file is listed below:<BR>----|----10---|----20---|----30<BR>1901 2<BR>1905 1<BR>1910 6<BR>1925 1<BR>1941 1<BR>The following SAS program is submitted using the raw data file as input:<BR>data money;<BR>infile 'file-specification';<BR>input year quantity;<BR>total = total + quantity;<BR>run;<BR>What is the value of TOTAL when the data step finishes execution?<BR>A. 0<BR>B. 1<BR>C. 11<BR>D. . (missing numeric value)<BR>SAS Certification: Base Programming Practice Exam Page 16 of 50<BR>16. The following program is submitted:<BR>data numrecords;<BR>infile cards dlm = ',';<BR>input agent1 $ agent2 $ agent3 $;<BR>cards;<BR>jones,,brownjones,spencer,brown<BR>;<BR>run;<BR>What is the value for the variable named AGENT2 in the second observation?<BR>A. brown<BR>B. spencer<BR>C. ' ' (missing character value)<BR>D. There is no value because only one observation is created.<BR>SAS Certification: Base Programming Practice Exam Page 17 of 50<BR>17. The following program is submitted:<BR>data test;<BR>average = mean(6,4,.,2);<BR>run;<BR>What is the value of the variable AVERAGE?<BR>A. 0<BR>B. 3<BR>C. 4<BR>D. . (missing numeric value)<BR>SAS Certification: Base Programming Practice Exam Page 18 of 50<BR>18. Which of the following SAS REPORT procedure options controls how column headings are displayed<BR>over multiple lines?<BR>A. BREAK=<BR>B. LABEL=<BR>C. SPACE=<BR>D. SPLIT=<BR>SAS Certification: Base Programming Practice Exam Page 19 of 50<BR>19. Which one of the following statements is true when SAS encounters a data error?<BR>A. The execution phase is stopped, and a system abend occurs.<BR>B. A missing value is assigned to the appropriate variable, and execution continues.<BR>C. The execution phase is stopped, and a SAS data set is created with zero observations.<BR>D. A missing value is assigned to the appropriate variable, and execution stops at that point.<BR>SAS Certification: Base Programming Practice Exam Page 20 of 50<BR>20. The following SAS program is submitted at the start of a new SAS session:<BR>libname sasdata 'SAS-data-library';<BR>data sasdata.sales;<BR>set sasdata.salesdata;<BR>profit = expenses - revenues;<BR>run;<BR>proc print data = sales;<BR>run;<BR>The SAS data set SASDATA.SALESDATA has ten observations.<BR>Which of the following explains why a report fails to generate?<BR>A. The DATA step fails to execute.<BR>B. The SAS data set SALES does not exist.<BR>C. The PRINT procedure contains a syntax error.<BR>D. The SAS data set SALES has no observations.<BR>SAS Certification: Base Programming Practice Exam Page 21 of 50<BR>21. The following SAS program is submitted:<BR>data work.building;<BR>code = 'DAL523';<BR>code = 'SANFRAN604';<BR>code = 'HOUS731';<BR>length code $ 20;<BR>run;<BR>Which one of the following is the length of the CODE variable?<BR>A. 6<BR>B. 7<BR>C. 10<BR>D. 20<BR>SAS Certification: Base Programming Practice Exam Page 22 of 50<BR>22. The following SAS program is submitted:<BR>ods html file = 'newfile.html';<BR>proc print data = sasuser.houses;<BR>run;<BR>proc means data = sasuser.houses;<BR>run;<BR>proc freq data = sasuser.shoes;<BR>run;<BR>ods html close;<BR>proc print data = sasuser.shoes;<BR>run;<BR>How many HTML files are created?<BR>A. 1<BR>B. 2<BR>C. 3<BR>D. 4<BR>SAS Certification: Base Programming Practice Exam Page 23 of 50<BR>23. The SAS data set EMPLOYEE_INFO is listed below:<BR>IDNumber Expenses<BR>2542 100.00<BR>3612 133.15<BR>2198 234.34<BR>2198 111.12<BR>The following SAS program is submitted:<BR>proc sort data = employee_info;<BR><insert BY statement here><BR>run;<BR>Which one of the following BY statements completes the program and sorts the data in sequential order<BR>by descending EXPENSES values within ascending IDNUMBER values?<BR>A. by descending Expenses IDNumber;<BR>B. by descending IDNumber Expenses;<BR>C. by IDNumber Expenses descending;<BR>D. by IDNumber descending Expenses;<BR>SAS Certification: Base Programming Practice Exam Page 24 of 50<BR>24. A raw data file is listed below:<BR>----|----10---|----20---|----30---|----40---|----50---|<BR>TWOSTORY 1040 2 1SANDERS ROAD $55,850<BR>CONDO 2150 4 2.5JEANS AVENUE $127,150<BR>The following SAS program is submitted using the raw data file as input:<BR>data work.houses;<BR>infile 'file-specification';<BR><insert INPUT statement here><BR>run;<BR>Which one of the following INPUT statements reads the raw data file correctly?<BR>A. input @1 style $8.<BR>+1 sqfeet 4.<BR>+1 bedrooms 1.<BR>@20 baths 3.<BR>street 16.<BR>@40 price dollar8;<BR>B. input @1 style $8<BR>+1 sqfeet 4.<BR>+1 bedrooms 1.<BR>@20 baths 3.<BR>street $16<BR>@40 price dollar8.;<BR>C. input @1 style $8.<BR>+1 sqfeet 4.<BR>+1 bedrooms 1.<BR>@20 baths 3.<BR>street $16.<BR>@40 price dollar8.;<BR>D. input @1 style $8.<BR>+1 sqfeet 4.<BR>+1 bedrooms 1.<BR>@20 baths 3<BR>street $16.<BR>@40 price dollar8.;<BR>SAS Certification: Base Programming Practice Exam Page 25 of 50<BR>25. The following SAS program is submitted:<BR>proc report data = survey nowd;<BR>column age choice1;<BR><insert DEFINE statement here><BR>define choice1 / display;<BR>run;<BR>Which one of the following DEFINE statements completes the program and displays values of the AGE<BR>variable in ascending sequence?<BR>A. define age / sort;<BR>B. define age / order;<BR>C. define age / sort by age;<BR>D. define age / order by age;<BR>SAS Certification: Base Programming Practice Exam Page 26 of 50<BR>26. The following SAS program is submitted:<BR>data work.test;<BR>set sasuser.class;<BR>array t{3} <insert text here> (5, 10, 15);<BR>run;<BR>Which one of the following completes the ARRAY statement and creates data elements that are not<BR>included in the SAS data set WORK.TEST?<BR>A. _CROP_<BR>B. _TEMP_<BR>C. _TEMPORARY_<BR>D. No extra text is needed.<BR>SAS Certification: Base Programming Practice Exam Page 27 of 50<BR>27. Which one of the following displays the contents of an external file from within a SAS session?<BR>A. LIST procedure<BR>B. PRINT procedure<BR>C. FSLIST procedure<BR>D. VIEWTABLE window<BR>SAS Certification: Base Programming Practice Exam Page 28 of 50<BR>28. Which one of the following statements is true when SAS encounters a syntax error in a DATA step?<BR>A. The SAS log contains an explanation of the error.<BR>B. The DATA step continues to execute and the resulting data set is complete.<BR>C. The DATA step stops executing at the point of the error and the resulting data set contains<BR>observations up to that point.<BR>D. A note appears in the SAS log indicating that the incorrect statement was saved to a SAS<BR>data set for further examination.<BR>SAS Certification: Base Programming Practice Exam Page 29 of 50<BR>29. The following SAS program is submitted:<BR>proc contents data = sasuser.houses;<BR>run;<BR>The exhibit below contains partial output produced by the CONTENTS procedure:<BR>Which one of the following describes the SASUSER.HOUSES data set?<BR>A. The data set is sorted but not indexed.<BR>B. The data set is both sorted and indexed.<BR>C. The data set is not sorted but is indexed.<BR>D. The data set is neither sorted nor indexed.<BR>SAS Certification: Base Programming Practice Exam Page 30 of 50<BR>30. The following SAS program is submitted:<BR>data test;<BR>input animal1 $ animal2 $<BR>mlgramsl mlgrams2;<BR>cards;<BR>hummingbird ostrich 54000.39 90800000.87<BR>;<BR>run;<BR>Which one of the following represents the values of each variable in the output data set?<BR>A. animal1 animal2 mlgrams1 mlgrams2<BR>hummingbird ostrich 54000.39 90800000<BR>B. animal1 animal2 mlgrams1 mlgrams2<BR>hummingb ostrich 54000.39 90800000.87<BR>C. animal1 animal2 mlgrams1 mlgrams2<BR>hummingbird ostrich 54000.39 90800000.87<BR>D. animal1 animal2 mlgrams1 mlgrams2<BR>hummingb ostrich 54000.39 90800000<BR>SAS Certification: Base Programming Practice Exam Page 31 of 50<BR>31. A raw data file is listed below:<BR>----|----10---|----20---|----30<BR>10<BR>23<BR>20<BR>15<BR>The following SAS program is submitted using the raw data file as input:<BR>data all_sales;<BR>infile file-specification;<BR>input receipts;<BR><insert statement(s) here><BR>run;<BR>Which of the following completes the program and produces a running total of the values of the<BR>RECEIPTS variable?<BR>A. total + receipts;<BR>B. total 0;<BR>sum total;<BR>C. total = total + receipts;<BR>D. total = sum(total,receipts);<BR>SAS Certification: Base Programming Practice Exam Page 32 of 50<BR>32. Assume that SAS data sets SASDATA.PRODUCTS and SASDATA.SALES both contain the PROD_ID<BR>variable.<BR>Which one of the following SAS DATA steps returns only exceptions or non-matches?<BR>A. libname sasdata 'SAS-data-library';<BR>data all;<BR>merge sasdata.products<BR>sasdata.sales;<BR>by prod_id;<BR>if ins = 1 or inp = 1;<BR>run;<BR>B. libname sasdata 'SAS-data-library';<BR>data all;<BR>merge sasdata.products(in = inp)<BR>sasdata.sales(in = ins);<BR>by prod_id;<BR>if ins = 1 and inp = 1;<BR>run;<BR>C. libname sasdata 'SAS-data-library';<BR>data all;<BR>merge sasdata.products<BR>sasdata.sales;<BR>by prod_id;<BR>if ins = 0 and inp = 0;<BR>run;<BR>D. libname sasdata 'SAS-data-library';<BR>data all;<BR>merge sasdata.products(in = inp)<BR>sasdata.sales(in = ins);<BR>by prod_id;<BR>if ins = 0 or inp = 0;<BR>run;<BR>SAS Certification: Base Programming Practice Exam Page 33 of 50<BR>33. The following SAS program is submitted:<BR>data work.travel;<BR>do i = 1 to 6 by 2;<BR>trip + i;<BR>end;<BR>run;<BR>Which one of the following is the value of the variable TRIP in the output data set?<BR>A. 2<BR>B. 3<BR>C. 9<BR>D. 10<BR>SAS Certification: Base Programming Practice Exam Page 34 of 50<BR>34. Which action assigns a reference named SALES to a permanent SAS data library?<BR>A. Issuing the command:<BR>libref SALES 'SAS-data-library'<BR>B. Issuing the command:<BR>libname SALES 'SAS-data-library'<BR>C. Submitting the statement:<BR>libref SALES 'SAS-data-library';<BR>D. Submitting the statement:<BR>libname SALES 'SAS-data-library';<BR>SAS Certification: Base Programming Practice Exam Page 35 of 50<BR>35. Which TITLE statement would display JANE'S DOG as the text of the title?<BR>A. title "JANE"S DOG";<BR>B. title 'JANE"S DOG';<BR>C. title "JANE'S DOG";<BR>D. title 'JANE' ' 'S DOG';<BR>SAS Certification: Base Programming Practice Exam Page 36 of 50<BR>36. The following program is submitted.<BR>data work.test;<BR>set work.staff (keep = salary1 salary2 salary3);<BR><insert ARRAY statement here><BR>run;<BR>Which one of the following ARRAY statements completes the program and creates new variables?<BR>A. array salary{3};<BR>B. array new_salary{3};<BR>C. array salary{3} salary1 - salary3;<BR>D. array new_salary{3} salary1 - salary3;<BR>SAS Certification: Base Programming Practice Exam Page 37 of 50<BR>37. The SAS data sets WORK.EMPLOYEE and WORK.SALARY are shown below:<BR>WORK.EMPLOYEE WORK.SALARY<BR>fname age fname salary<BR>Bruce 30 Bruce 25000<BR>Dan 40 Bruce 35000<BR>Dan 25000<BR>The following merged SAS data set is generated:<BR>WORK.EMPDATA<BR>fname age totsal<BR>Bruce 30 60000<BR>Dan 40 25000<BR>Which one of the following SAS programs created the merged data set?<BR>A. data work.empdata;<BR>merge work.employee<BR>work.salary;<BR>by fname;<BR>if first.fname then totsal = 0;<BR>totsal + salary;<BR>if last.fname then output;<BR>run;<BR>B. data work.empdata(drop = salary);<BR>merge work.employee<BR>work.salary;<BR>by fname;<BR>if first.fname then totsal = 0;<BR>totsal + salary;<BR>if last.fname then output;<BR>run;<BR>C. data work.empdata;<BR>merge work.employee<BR>work.salary(drop = salary);<BR>by fname;<BR>if first.fname then totsal = 0;<BR>totsal + salary;<BR>if last.fname then output;<BR>run;<BR>D. data work.empdata;<BR>merge work.employee<BR>work.salary;<BR>by fname;<BR>if first.fname then totsal + salary;<BR>run;<BR>SAS Certification: Base Programming Practice Exam Page 38 of 50<BR>38. The following SAS program is submitted:<BR>data newstaff;<BR>set staff;<BR><insert WHERE statement here><BR>run;<BR>Which one of the following WHERE statements complete the program and selects only observations<BR>with a HIRE_DATE of February 23, 2000?<BR>A. where hire_date = '23feb2000'd;<BR>B. where hire_date = '23feb2000';<BR>C. where hire_date = '02/23/2000'd;<BR>D. where hire_date = '02/23/2000';<BR>SAS Certification: Base Programming Practice Exam Page 39 of 50<BR>39. The following SAS program is submitted:<BR>data work.accounting;<BR>length jobcode $ 12;<BR>set work.department;<BR>run;<BR>The WORK.DEPARTMENT SAS data set contains a character variable named JOBCODE with a length<BR>of 5.<BR>Which of the following is the length of the variable JOBCODE in the output data set?<BR>A. 5<BR>B. 8<BR>C. 12<BR>D. The length can not be determined as the program fails to execute due to errors.<BR>SAS Certification: Base Programming Practice Exam Page 40 of 50<BR>40. The descriptor and data portions of the WORK.SALARIES data set are shown below:<BR>Descriptor Portion:<BR># Variable Type Len Pos<BR>1 name Char 8 0<BR>3 salary Char 8 16<BR>2 status Char 8 8<BR>Data Portion:<BR>name status salary<BR>Liz S 15,600<BR>Herman S 26,700<BR>Marty S 35,000<BR>The following SAS program is submitted:<BR>proc print data = work.salaries;<BR>where salary < 20000;<BR>run;<BR>What of the following is displayed in the SAS log after the program is executed?<BR>A. A NOTE indicating that 1 observation was read.<BR>B. A NOTE indicating that o observations were read.<BR>C. An ERROR indicating that the WHERE clause operator requires compatible variables.<BR>D. A WARNING indicating that character values have been converted to numeric values.<BR>SAS Certification: Base Programming Practice Exam Page 41 of 50<BR>41. Which one of the following permanently associates a format with a variable?<BR>A. the FORMAT procedure<BR>B. a FORMAT statement in a DATA step<BR>C. an INPUT function with format modifiers<BR>D. an INPUT statement with formatted style input<BR>SAS Certification: Base Programming Practice Exam Page 42 of 50<BR>42. Which one of the following SAS date formats displays January 16, 2002 in the form of 16/01/2002?<BR>A. date10.<BR>B. ddmmyy10.<BR>C. weekdate10.<BR>D. ddmmyyyy10.<BR>SAS Certification: Base Programming Practice Exam Page 43 of 50<BR>43. The following SAS program is submitted:<BR>proc sort data = work.test;<BR>by fname descending salary;<BR>run;<BR>Which one of the following represents how the observations are sorted?<BR>A. The data set WORK.TEST is stored in ascending order by SALARY value within ascending<BR>FNAME values.<BR>B. The data set WORK.TEST is stored in ascending order by SALARY value within descending<BR>FNAME values.<BR>C. The data set WORK.TEST is stored in descending order by SALARY value within descending<BR>FNAME values.<BR>D. The data set WORK.TEST is stored in descending order by SALARY value within ascending<BR>FNAME values.<BR>SAS Certification: Base Programming Practice Exam Page 44 of 50<BR>44. A SAS report currently flows over two pages because it is too long to fit within the specified display<BR>dimension.<BR>Which one of the following actions changes the display dimension so that the report fits on one page?<BR>A. increasing the value of the LINENO option<BR>B. decreasing the value of the PAGENO option<BR>C. decreasing the value of the LINESIZE option<BR>D. increasing the value of the PAGESIZE option<BR>SAS Certification: Base Programming Practice Exam Page 45 of 50<BR>45. The following SAS program is submitted:<BR>data names;<BR>title = 'EDU';<BR>if title = 'EDU' then<BR>division = 'Education';<BR>else if title = 'HR' then<BR>division = 'Human Resources';<BR>else division = 'Unknown';<BR>run;<BR>Which one of the following represents the value of the variable DIVISION in the output data set?<BR>A. Educatio<BR>B. Education<BR>C. Human Re<BR>D. Human Resources<BR>SAS Certification: Base Programming Practice Exam Page 46 of 50<BR>46. The following SAS program is submitted:<BR>libname sasdata 'SAS-data-library';<BR>libname labdata 'SAS-data-library';<BR>data labdata.boston<BR>labdata.dallas(drop = city dest equipment);<BR>set sasdata.cities(keep = orig dest city price equipment);<BR>if dest = 'BOS' then output labdata.boston;<BR>else if dest = 'DFW' then output labdata.dallas;<BR>run;<BR>Which of the following variables are output to both data sets?<BR>A. PRICE and ORIG only<BR>B. CITY and EQUIPMENT only<BR>C. CITY, PRICE, and EQUIPMENT only<BR>D. CITY, PRICE, ORIG, and EQUIPMENT<BR>SAS Certification: Base Programming Practice Exam Page 47 of 50<BR>47. A raw data file is listed below:<BR>----|----10---|----20---|----30<BR>01/05/1989 Frank 11<BR>12/25/1987 June 13<BR>01/05/1991 Sally 9<BR>The following SAS program is submitted using this raw data file as input:<BR>data work.family;<BR>infile 'file-specification';<BR>input @1 date_of_birth mmddyy10.<BR>@15 first_name $5.<BR>@25 age 3;<BR>run;<BR>proc print data = work.family noobs;<BR>run;<BR>Which of the following is the result?<BR>A. The program executes, but the age values are missing in the output.<BR>B. The program executes, but the date values are missing in the output.<BR>C. The program fails to execute as the age informat is coded incorrectly.<BR>D. The program fails to execute as the date informat is coded incorectly.<BR>SAS Certification: Base Programming Practice Exam Page 48 of 50<BR>48. Which one of the following SAS programs creates a variable named CITY with a value of 'Chicago'?<BR>A. data work.airports;<BR>AirportCode = 'ord';<BR>if AirportCode = 'ORD' city = 'Chicago';<BR>run;<BR>B. data work.airports;<BR>AirportCode = 'ORD';<BR>if AirportCode = 'ORD' city = 'Chicago';<BR>run;<BR>C. data work.airports;<BR>AirportCode = 'ORD';<BR>if AirportCode = 'ORD' then city = 'Chicago';<BR>run;<BR>D. data work.airports;<BR>AirportCode = 'ORD';<BR>if AirportCode = 'ORD';<BR>then city = 'Chicago';<BR>run;<BR>SAS Certification: Base Programming Practice Exam Page 49 of 50<BR>49. An HTML file contains a SAS report.<BR>Which one of the following ODS statement options specifies the name of the HTML file?<BR>A. OUT=<BR>B. FILE=<BR>C. HTML=<BR>D. HTMLFILE=<BR>SAS Certification: Base Programming Practice Exam Page 50 of 50<BR>50. The following SAS program is submitted:<BR>proc contents data = sasuser._all_ nods;<BR>run;<BR>Which one of the following is produced as output?<BR>A. the list of all data set names in the SASUSER library only<BR>B. the descriptor portion of the data set named SASUSER._ALL_ only<BR>C. the descriptor portion of every data set in the SASUSER library only<BR>D. the list of data set names in the SASUSER library plus the descriptor portion of every data set in<BR>the SASUSER library<BR></P>


雷达卡



京公网安备 11010802022788号







