SAS Adv 模拟 130

2020-04-14 05:36

1. Given the SAS data set ONE:

ONE

DIVISION SALES A 1234 A 3654 B 5678

The following SAS program is submitted:

data _null_; set one; by division;

if first.division then do; %let mfirst = sales; end; run;

What is the value of the macro variable MFIRST when the program finishes execution? A. 1234 B. 5678 C. null D. sales

2. The following SAS program is submitted:

data temp;

array points{2,3} (10, 15, 20, 25,30, 35); run;

What impact does the ARRAY statement have in the Program Data Vector (PDV)?

A. The variables named POINTS1, POINTS2, POINTS3, POINTS4, POIN TS5, POINTS6 are created in the PDV.

B. The variables named POINTS10, POINTS15, POINTS20, POINTS25, POINTS30,POINTS35 are created in the PDV.

C. The variables named POINTS11, POINTS12, POINTS13, POINTS21, POINTS22, POINTS23 are created in the PDV.

D. No variables are created in the PDV.

3. Given the SAS data sets MATH1A and MATH1B: MATH1A MATH1B ---------------------------------- NAME FI NAME FI -------- --- --------- ---- Lauren L Smith M Patel A Lauren S Chang Z Patel A

Hillier R

The following SAS program is submitted: proc sql;

select * from MATH1A select * from MATH1B;

quit;

The following output is desired: NAME FI Lauren L Patel A Chang Z Smith M Lauren S Patel A Hillier R

Which SQL set operator completes the program and generates the desired output? A. APPEND CORR B. EXCEPT CORR

C. OUTER UNION CORR D. INTERSECT ALL CORR

4. The following SAS program is submitted: %let test = one; %let one = two; %let two = three; %let three = last;

%put what displays is &&&&&test;

What is written to the SAS log? A. what displays is one B. what displays is two C. what displays is three D. what displays is last

5. Given the following partial SAS log: 29 %macro test;

30 %if &a = 5 %then %do;

31 proc print data = sashelp.prdsale; 32 run; 33 %end;

34 %else %put a is not 5; 35 %mend; 36

37 %let a = 5; 38 %test (TEST):

Beginning execution. : Macro variable A resolves to 5 (TEST): %IF condition &a = 5 is TRUE (TEST): proc print data = sashelp.prdsale; (TEST): run;

Which SAS System option writes to the SAS log the note Macro variable A resolves to 5? A. MLOGIC B. MPRINT

C. SYMBOLGEN D. MSGLEVEL= I

6. The SAS data set WORK.TEMPDATA contains the variables FMTNAME, START, and LABEL and it consists of 10 observations. The following SAS program is submitted: proc format cntlin = work.tempdata; run;

What is the result of submitting the FORMAT procedure step? A. No formats are created in this step.

B. All formats created will be stored in the WORK.TEMPDATA SAS data set. C. It uses the WORK.TEMPDATA SAS data set as input to create the format.

D. An ERROR message is written to the SAS log because the program is incomplete.

7. Given the SAS data sets ONE and TWO: ONE TWO YEAR QTR BUDGET YEAR QTR 2001 3 500 2001 4 2001 4 400 2001 2 2002 1 700 2002 1

The following SAS program is submitted:

proc sql;

select one.*, sales from one, two

where one.year = two.year;

quit;

Which report is generated? A. YEAR QTR BUDGET SALES

2001 4 400 300 2002 1 700 600

B. YEAR QTR BUDGET SALES

2001 3 500 300 2001 4 400 200 2002 1 700 600

C. YEAR QTR BUDGET SALES

2001 3 500 300 2001 3 500 200 2001 4 400 300 2001 4 400 200 2002 1 700 600

D. YEAR QTR BUDGET SALES

2001 3 500 300 2001 4 400 300 2002 1 700 300 2001 3 500 200 2001 4 400 200 2002 1 700 200 2001 3 500 600 2001 4 400 600 2002 1 700 600

8. Given the SAS data sets ONE and TWO: ONE TWO YEAR QTR BUDGET YEAR QTR 2001 3 500 2001 4 2001 4 400 2002 1 2002 1 700

The following SAS program is submitted: proc sql;

SALES 300 200 600 SALES 300 600 select one.*, sales from one

left join two on one.year = two.year where one.year=2001; quit;

Which report is generated? A. YEAR QTR BUDGET SALES

2001 3 500 . 2001 4 700 600

B. YEAR QTR BUDGET SALES

2001 3 500 300 2001 4 400 300

C. YEAR QTR BUDGET SALES

2001 3 500 300 2001 4 400 300 2002 1 700 600

D. YEAR QTR BUDGET SALES

2001 3 500 . 2001 4 400 300 2001 4 . 300

9. Given the SAS data set ONE: ONE

COUNTRY CITY VISIT USA BOSTON 10 UK LONDON 5 USA DALLAS 10 UK MARLOW 10 USA BOSTON 20 USA BOSTON 20 UK LONDON 15 USA DALLAS 10

The following SAS program is submitted: proc sql;

select country, city, sum(visit) as TOTAL from one group by country, city order by country, total desc; quit;

Which report is generated? A. COUNTRY CITY TOTAL USA DALLAS 20 USA BOSTON 50 UK MARLOW 10 UK LONDON 20

B. COUNTRY CITY TOTAL UK LONDON 20 UK MARLOW 10 USA BOSTON 50 USA DALLAS 20

C. COUNTRY CITY TOTAL USA BOSTON 50 USA DALLAS 20

UK LONDON 20 UK MARLOW 10

D. COUNTRY CITY TOTAL UK MARLOW 10 UK LONDON 20 USA DALLAS 20 USA BOSTON 50

10. Given the SAS data set ONE:

ONE

CATEGORY AGE SALARY BONUS M 29 200 20 M 25 100 10 M 48 300 10 F 38 300 50 F 25 200 .

The following output is desired: CATEGORY EARNINGS F 550 M 640

The following SAS program is submitted: proc sql;

from one group by category; quit;

Which SQL procedure clause completes the program and generates the desired output?

A. select category, sum(salary, bonus) as EARNINGS B. select category, sum(salary + bonus) as EARNINGS

C. select distinct category, sum(salary, bonus) as EARNINGS

D. select distinct category, sum(sum(salary, bonus)) as EARNINGS

11. Given the SAS data sets ONE and TWO: ONE TWO NUM COUNTRY NUM CITY 1 CANADA 3 PARIS 2 FRANCE 5 TOKYO 3 GERMANY 4 BELGIUM 5 JAPAN

The following SAS program is submitted: proc sql;

select country from one where not exists

(select * from two where one.num = two.num); quit;

Which report is generated? A. COUNTRY FRANCE JAPAN

B. COUNTRY GERMANY


SAS Adv 模拟 130.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:外卖流程及规范

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

马上注册会员

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