BookmarkSubscribeRSS Feed

SAS Ceritified Advanced Programmer 덤프 풀이 54-56

Started ‎06-15-2020 by
Modified ‎06-15-2020 by
Views 187

54. Consider the following SAS log:

229 data sasuser.ranch sasuser.condo / view = sasuser.ranch;

230 set sasuser.houses;

231 if style = 'RANCH' then output sasuser.ranch;

232 else if style = 'CONDO' then output sasuser.condo;

233 run;

NOTE: DATA STEP view saved on file SASUSER.RANCH.

NOTE: A stored DATA STEP view cannot run under a different operating system.

234

235 proc print data = sasuser.condo;

ERROR: File SASUSER.CONDO.DATA does not exist.

236 run;

NOTE: The SAS System stopped processing this step because of errors.

Which one of the following explains why the PRINT procedure fails?

A. SASUSER.CONDO is a stored DATA step program.

B. A SAS data file and SAS data view cannot be created in the same DATA step.

C. A second VIEW=SASUSER.CONDO option was omitted on the DATA statement.

D. The view SASUSER.RANCH must be processed before SASUSER.CONDO is created.

정답 : D

해설 : View가 CONDO데이터 생성 전에 실행되어야 합니다. CONDO라는 데이터 셋이 생성된 후 Ranch라는 View가 생성되었으므로 CONDO에는 아무런 데이터 값이 없습니다.

 

 

 

55. Given the following SAS data sets ONE and TWO:

ONE TWO

YEAR QTR BUDGET YEAR QTR SALES

---------------------- ------------------------

2001 3 500 2001 4 300

2001 4 400 2002 1 600

2002 1 700

The following SAS program is submitted:

proc sql;

select one.*, sales

from one left join two

on one.year = two.year;

quit;

Which one of the following reports is generated?

A. YEAR QTR BUDGET SALES

------------------------------

2001 3 500 .

B. YEAR QTR BUDGET SALES

------------------------------

2001 4 400 300

2002 1 700 600

C. YEAR QTR BUDGET SALES

------------------------------

2001 3 500 .

2001 4 400 300

2002 1 700 600

D. YEAR QTR BUDGET SALES

------------------------------

2001 3 500 300

2001 4 400 300

2002 1 700 600

정답 : D

해설 : Left조인이란 왼쪽의 데이터를 기준으로 오른쪽 데이터를 붙여주는 것입니다. 그러므로 왼쪽의 데이터에는 변함이 없고, 년도가 같은 조건 하에 "SALES"변수만 붙습니다.

 

 

 

56. Given the following SAS data sets ONE and TWO:

ONE TWO

YEAR QTR BUDGET YEAR QTR SALES

-------------------------- -----------------------------

2001 3 500 2001 4 300

2001 4 400 2002 1 600

2002 1 700

The following SAS program is submitted:

proc sql;

select one.*, sales

from one, two

where one.year = two.year;

quit;

Which one of the following reports is generated?

 

A. YEAR QTR BUDGET SALES

------------------------------

2001 4 400 300

2002 1 700 600

B. YEAR QTR BUDGET SALES

------------------------------

2001 3 500 .

2001 4 400 300

2002 1 700 600

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 300

2001 4 400 300

2002 1 700 300

2001 3 500 600

2001 4 400 600

2002 1 700 600

정답 : C

Version history
Last update:
‎06-15-2020 04:27 AM
Updated by:
Contributors

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Article Labels
Article Tags