SAS 考题 123(7)

2019-04-16 15:13

D. to print a list of the variables in the order they were created 80

The following SAS program is submitted: proc contents data = sasuser.airplanes; run;

Which one of the following is produced as output?

A. the data portion of every data set in the SASUSER library B. the data portion of the data set SASUSER.AIRPLANES only C. the descriptor portion of every data set in the SASUSER library D. the descriptor portion of the data set SASUSER.AIRPLANES only 81

A raw data file is listed below: --------10-------20-------30 John McCloskey 35 71 June Rosesette 10 43 Tineke Jones 9 37

The following SAS program is submitted using the raw data file as input: data work.homework; infile 'file-specification'; input name $ age height; if age LE 10; run;

How many observations will the WORK.HOMEWORK data set contain? A. 0 B. 2 C. 3

D. No data set is created as the program fails to execute due to errors. 82

The SASDATA.BANKS data set has five observations when the following SAS program is submitted:

libname sasdata 'SAS-data-library'; data allobs;

set sasdata.banks; capital=0;

do year = 2000 to 2020 by 5; capital + ((capital+2000) * rate); output; end; run;

How many observations will the ALLOBS data set contain? A. 5

31

B. 15 C. 20 D. 25 83

The SAS data set named COMPANY.PRICES is listed below: COMPANY.PRICES

prodid price producttype sales returns K12S 5.10 NETWORK 15 2

B132S 2.34 HARDWARE 300 10 R18KY2 1.29 SOFTWARE 25 5 3KL8BY 6.37 HARDWARE 125 15 DY65DW 5.60 HARDWARE 45 5 DGTY23 4.55 HARDWARE 67 2

The following SAS program is submitted: libname company 'SAS-data-library'; data hware inter soft;

set company.prices (keep = producttype price); if price le 5.00;

if producttype = 'HARDWARE' then output HWARE; else if producttype = 'NETWORK' then output INTER; else if producttype = 'SOFTWARE' then output SOFT; run;

How many observations does the HWARE data set contain? A. 0 B. 2 C. 4 D. 6 84

The following SAS program is submitted: data allobs;

set sasdata.origin (firstobs = 75 obs = 499); run;

The SAS data set SASDATA.ORIGIN contains 1000 observations. How many observations does the ALLOBS data set contain? A. 424 B. 425 C. 499 D. 1000 85

The following SAS program is submitted: data _null_;

set old (keep = prod sales1 sales2);

32

file 'file-specification'; put sales1 sales2; run;

Which one of the following default delimiters separates the fields in the raw data file created? A. : (colon) B. (space) C. , (comma) D. ; (semicolon) 86

The following SAS program is submitted: data _null_; set old;

put sales1 sales2; run;

Where is the output written? A. the SAS log

B. the raw data file that was opened last C. the SAS output window or an output file

D. the data set mentioned in the DATA statement 87

The contents of the raw data file TEAM are listed below: --------10-------20-------30 Janice 10 Henri 11 Michael 11 Susan 12

The following SAS program is submitted: data group; infile 'team';

input name $15. age 2.; file 'file-specification'; put name $15. +5 age 2.; run;

Which one of the following describes the output created? A. a raw data file only

B. a SAS data set named GROUP only

C. a SAS data set named GROUP and a raw data file

D. No output is generated as the program fails to execute due to errors. 88

The contents of the SAS data set named PERM.STUDENTS are listed below: name age

33

Alfred 14 Alice 13 Barbara 13 Carol 14

The following SAS program is submitted using the PERM.STUDENTS data set as input: libname perm 'SAS-data-library'; data students; set perm.students; file 'file-specification'; put name $15. @5 age 2.; run;

Which one of the following represents the values written to the output raw data file? A. --------10-------20-------30 Alfred 14 Alice 13 Barbara 13 Carol 14

B. --------10-------20-------30 Alfr14 Alic13 Barb13a Caro14

C. --------10-------20-------30 Alfr14ed Alic13e Barb13ara Caro14l

D. --------10-------20-------30 Alfred 14 Alice 13 Barbara 13 Carol 14 89

The contents of the SAS data set PERM.JAN_SALES are listed below: VARIABLE NAME TYPE idnum character variable

sales_date numeric date value

A comma delimited raw data file needs to be created from the PERM.JAN_SALES data set. The SALES_DATE values need to be in a MMDDYY10 form.

Which one of the following SAS DATA steps correctly creates this raw data file? A. libname perm 'SAS-data-library'; data _null_;

34

set perm.jan_sales;

file 'file-specification' dsd = ','; put idnum sales_date : mmddyy10.; run;

B. libname perm 'SAS-data-library'; data _null_;

set perm.jan_sales;

file 'file-specification' dlm = ','; put idnum sales_date : mmddyy10.; run;

C. libname perm 'SAS-data-library'; data _null_;

set perm.jan_sales; file 'file-specification';

put idnum sales_date : mmddyy10. dlm = ','; run;

D. libname perm 'SAS-data-library'; data _null_;

set perm.jan_sales; file 'file-specification';

put idnum sales_date : mmddyy10. dsd = ','; run; 90

A raw data record is shown below: 07Jan2002

Which one of the following informats would read this value and store it as a SAS date value? A. date9.

B. ddmonyy9. C. ddMMMyy9. D. ddmmmyyyy9. 91

The following SAS program is submitted: libname temp 'SAS-data-library'; data work.new; set temp.jobs;

format newdate mmddyy10.; qdate = qtr(newdate);

ddate = weekday(newdate); run;

proc print data = work.new; run;

The variable NEWDATE contains the SAS date value for April 15, 2000.

35


SAS 考题 123(7).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:【精品】2018年四川省德阳市中考生物试卷及答案

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: