SAS认证220道练习题及详细答案(可编辑)

上传人:1777****777 文档编号:36497254 上传时间:2021-10-31 格式:DOC 页数:66 大小:93KB
收藏 版权申诉 举报 下载
SAS认证220道练习题及详细答案(可编辑)_第1页
第1页 / 共66页
SAS认证220道练习题及详细答案(可编辑)_第2页
第2页 / 共66页
SAS认证220道练习题及详细答案(可编辑)_第3页
第3页 / 共66页
资源描述:

《SAS认证220道练习题及详细答案(可编辑)》由会员分享,可在线阅读,更多相关《SAS认证220道练习题及详细答案(可编辑)(66页珍藏版)》请在装配图网上搜索。

1、SAS认证220道练习题及详细答案 SAS Certificate Base Practice Questions and Detailed Answers Chapter 1 Basic Concepts Chapter 2 Referencing Files and Setting Options Chapter 3 Editing and Debugging SAS Programs Chapter 4 Creating List Reports Chapter 5 Creating SAS Data Sets from Raw Data Chapter 6 Understanding

2、DATA Step Processing Chapter 7 Creating and Applying User-Defined Formats Chapter 8 Creating Enhanced List and Summary Reports Chapter 9 Producing Descriptive Statistics Chapter 10 Producing 6HTML Output Chapter 11 Creating and Managing Variables Chapter 12 Reading SAS Data Sets Chapter 13 Combining

3、 SAS Data Sets Chapter 14 Transforming Data with SAS Functions Chapter 15 Generating Data with DO Loops Chapter 16 Processing Variables with Arrays Chapter 17 Reading Raw Data in Fixed Fields Chapter 18 Reading Free-Format Data Chapter 19 Reading Date and Time Values Chapter 20 Creating a Single Obs

4、ervation from Multiple Records Chapter 21 Creating Multiple Observations from a Single Record Chapter 22 Reading Hierarchical Files 1 Chapter 1 Basic Concepts Answer Key 1 How many observations and variables does the data set below contain a 3 observations 4 variables b 3 observations 3 variables c

5、4 observations 3 variables d cant tell because some values are missing Correct c answer Rows in the data set are called observations and columns are called variables Missing values dont affect the structure of the data set 2 How many program steps are executed when the program below is processed dat

6、a usertables infile jobs input date name job run proc sort data usertables by name run proc print data usertables run a three b four c five d six Correct a answer When it encounters a DATA PROC or RUN statement SAS stops reading statements and 2 executes the previous step in the program The program

7、above contains one DATA step and two PROC steps for a total of three program steps 3 What type of variable is the variable AcctNum in the data set below a numeric b character c can be either character or numeric d cant tell from the data shown Correct b answer It must be a character variable because

8、 the values contain letters and underscores which are not valid characters for numeric values 4 What type of variable is the variable Wear in the data set below a numeric b character c can be either character or numeric d cant tell from the data shown Correct a answer It must be a numeric variable b

9、ecause the missing value is indicated by a period rather than by a blank 3 5 Which of the following variable names is valid a 4BirthDate b Cost c _Items_ d Tax-Rate Correct c answer Variable names follow the same rules as SAS data set names They can be 1 to 32 characters long must begin with a lette

10、r AZ either uppercase or lowercase or an underscore and can continue with any combination of numbers letters or underscores 6 Which of the following files is a permanent SAS file a SashelpPrdSale b SasuserMySales c ProfitsQuarter1 d all of the above Correct d answer To store a file permanently in a

11、SAS data library you assign it a libref other than the default Work For example by assigning the libref Profits to a SAS data library you specify that files within the library are to be stored until you delete them Therefore SAS files in the Sashelp and Sasuser libraries are permanent files 7 In a D

12、ATA step how can you reference a temporary SAS data set named Forecast a Forecast b WorkForecast c SalesForecast after assigning the libref Sales d only a and b above Correct d answer To reference a temporary SAS file in a DATA step or PROC step you can specify the one- 4 level name of the file for

13、example Forecast or the two-level name using the libref Work for example WorkForecast 8 What is the default length for the numeric variable Balance a 5 b 6 c 7 d 8 Correct d answer The numeric variable Balance has a default length of 8 Numeric values no matter how many digits they contain are stored

14、 in 8 bytes of storage unless you specify a different length 9 How many statements does the following SAS program contain proc print data newprodsale label double var state day price1 price2 where state NC label state Name of State run a three b four c five d six Correct c answer The five statements

15、 are PROC PRINT statement two lines long 5 VAR statement WHERE statement on the same line as the VAR statement LABEL statement RUN statement on the same line as the LABEL statement 10 What is a SAS data library a a collection of SAS files such as SAS data sets and catalogs b in some operating enviro

16、nments a physical collection of SAS files c in some operating environments a logically related collection of SAS files d all of the above Correct d answer Every SAS file is stored in a SAS data library which is a collection of SAS files such as SAS data sets and catalogs In some operating environmen

17、ts a SAS data library is a physical collection of files In others the files are only logically related In the Windows and UNIX environments a SAS data library is typically a group of SAS files in the same folder or directory Chapter 2 Referencing Files and Setting Options 1 If you submit the followi

18、ng program how does the output look options pagesize 55 nonumber proc tabulate data clinicadmit class actlevel var age height weight table actlevel age height weight mean 6 run options linesize 80 proc means data clinicheart min dec 1 var arterial heart cardiac urinary class survive sex run a The PR

19、OC MEANS output has a print line width of 80 characters but the PROC TABULATE output has no print line width b The PROC TABULATE output has no page numbers but the PROC MEANS output has page numbers c Each page of output from both PROC steps is 55 lines long and has no page numbers and the PROC MEAN

20、S output has a print line width of 80 characters d The date does not appear on output from either PROC step Correct c answer When you specify a system option it remains in effect until you change the option or end your SAS session so both PROC steps generate output that is printed 55 lines per page

21、with no page numbers If you dont specify a system option SAS uses the default value for that system option 2 In order for the date values 05May1955 and 04Mar2046 to be read correctly what value must the YEARCUTOFF option have a a value between 1947 and 1954 inclusive b 1955 or higher c 1946 or highe

22、r d any value Correct d answer As long as you specify an informat with the correct field width for reading the entire date value the YEARCUTOFF option doesnt affect date values that have four-digit years 3 When you specify an engine for a library you are always specifying a the file format for files

23、 that are stored in the library 7 b the version of SAS that you are using c access to other software vendors files d instructions for creating temporary SAS files Correct a answer A SAS engine is a set of internal instructions that SAS uses for writing to and reading from files in a SAS library Each

24、 engine specifies the file format for files that are stored in the library which in turn enables SAS to access files with a particular format Some engines access SAS files and other engines support access to other vendors files 4 Which statement prints a summary of all the files stored in the librar

25、y named Area51 a proc contents data area51_all_ nods b proc contents data area51 _all_ nods c proc contents data area51 _all_ noobs d proc contents data area51 _all_nods Correct a answer To print a summary of library contents with the CONTENTS procedure use a period to append the _ALL_ option to the

26、 libref Adding the NODS option suppresses detailed information about the files 5 The following PROC PRINT output was created immediately after PROC TABULATE output Which SAS system options were specified when the report was created 8 a OBS DATE and NONUMBER b PAGENO 1 and DATE c NUMBER and DATE only

27、 d none of the above Correct b answer Clearly the DATE and PAGENO options are specified Because the page number on the output is 1 even though PROC TABULATE output was just produced If you dont specify PAGENO all output in the Output window is numbered sequentially throughout your SAS session 6 Whic

28、h of the following programs correctly references a SAS data set named SalesAnalysis that is stored in a permanent SAS library a data saleslibrarysalesanalysis set mydataquarter1sales if sales 100000 run b data mysalestotals set sales_99salesanalysis if totalsales 50000 run c proc print data salesana

29、lysisquarter1 var sales salesrep month run d proc freq data 1999datasalesanalysis 9 tables quartersales run Correct b answer Librefs must be 1 to 8 characters long must begin with a letter or underscore and can contain only letters numbers or underscores After you assign a libref you specify it as t

30、he first element in the two-level name for a SAS file 7 Which time span is used to interpret two-digit year values if the YEARCUTOFF option is set to 1950 a 1950-2049 b 1950-2050 c 1949-2050 d 1950-2000 Correct a answer The YEARCUTOFF option specifies which 100-year span is used to interpret two-dig

31、it year values The default value of YEARCUTOFF is 1920 However you can override the default and change the value of YEARCUTOFF to the first year of another 100-year span If you specify YEARCUTOFF 1950 then the 100-year span will be from 1950 to 2049 8 Asssuming you are using SAS code and not special

32、 SAS windows which one of the following statements is false a LIBNAME statements can be stored with a SAS program to reference the SAS library automatically when you submit the program b When you delete a libref SAS no longer has access to the files in the library However the contents of the library

33、 still exist on your operating system c Librefs can last from one SAS session to another d You can access files that were created with other vendors software by submitting a LIBNAME statement Correct c answer The LIBNAME statement is global which means that librefs remain in effect until you modify

34、them cancel them or end your SAS session Therefore the LIBNAME statement assigns the libref for the current SAS session only You must assign a libref before accessing 10 SAS files that are stored in a permanent SAS data library 9 What does the following statement do libname osiris spss cmyfilessasda

35、tadata a defines a library called Spss using the OSIRIS engine b defines a library called Osiris using the SPSS engine c defines two libraries called Osiris and Spss using the default engine d defines the default library using the OSIRIS and SPSS engines Correct b answer In the LIBNAME statement you

36、 specify the library name before the engine name Both are followed by the path 10 What does the following OPTIONS statement do options pagesize 15 nodate a suppresses the date and limits the page size of the log b suppresses the date and limits the vertical page size for text output c suppresses the

37、 date and limits the vertical page size for text and HTML output d suppresses the date and limits the horizontal page size for text output Correct b answer These options affect the format of listing output only NODATE suppresses the date and PAGESIZE determines the number of rows to print on the pag

38、e Chapter 3 Editing and Debugging SAS Programs Answer Key 1 As you write and edit SAS programs its a good idea to a begin DATA and PROC steps in column one 11 b indent statements within a step c begin RUN statements in column one d all of the above Correct d answer Although you can write SAS stateme

39、nts in almost any format a consistent layout enhances readability and enables you to understand the programs purpose Its a good idea to begin DATA and PROC steps in column one to indent statements within a step to begin RUN statements in column one and to include a RUN statement after every DATA ste

40、p or PROC step 2 What usually happens when an error is detected a SAS continues processing the step b SAS continues to process the step and the log displays messages about the error c SAS stops processing the step in which the error occurred and the log displays messages about the error d SAS stops

41、processing the step in which the error occurred and the program output displays messages about the error Correct c answer Syntax errors generally cause SAS to stop processing the step in which the error occurred When a program that contains an error is submitted messages regarding the problem also a

42、ppear in the SAS log When a syntax error is detected the SAS log displays the word ERROR identifies the possible location of the error and gives an explanation of the error 3 A syntax error occurs when a some data values are not appropriate for the SAS statements that are specified in a program b th

43、e form of the elements in a SAS statement is correct but the elements are not valid for that usage c program statements do not conform to the rules of the SAS language d none of the above Correct c 12 answer Syntax errors are common types of errors Some SAS system options features of the Editor wind

44、ow and the DATA step debugger can help you identify syntax errors Other types of errors include data errors semantic errors and execution-time errors 4 How can you tell whether you have specified an invalid option in a SAS program a A log message indicates an error in a statement that seems to be valid b A log message indicates that an option is not valid or not recognized c The message PROC running or DATA step running appears at the top of the active window d You cant tell until you view the output from t

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!