사이트맵  |  Contact Us
 
홈 > SAS Tech & Tip > SAS 고수의 팁
SAS Ceritified Advanced Programmer 덤프 풀이 54-56 2019.12.25
박세훈 184 0
http://www.mysas.co.kr/sas_tiptech/a_all.asp?b_no=11256&cmd=content&bd_no=33

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

 
 
휴대폰 번호
휴대폰 인증번호
 

 더 이상 글이 존재하지 않습니다.

 SAS Ceritified Advanced Programmer 덤프 풀이 52-53