BookmarkSubscribeRSS Feed

SAS Ceritified Advanced Programmer 덤프 풀이 41-43

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

41. The following SAS program is submitted:

%macro check(num=4);

%let result=%sysevalf(&num+0.5);

%put result is &result;

%mend;

%check(num=10)

What is the written to the SAS log?

A. result is

B. result is 10.5

C. result is 10+0.5

D. result is 10

 

정답 : B

해설 : 핵심은 매크로함수 각각이 어떤 기능을 하는지 숙지하는 것입니다. 이 경우 %SYSEVALF의 역할을 묻고 있습니다. SYSEVALF는 입력값을 실수로 받아들여 계산결과를 반환시켜줍니다. 만약 위의 함수가 %EVAL 이었다면, 10+0.5 라는 결과가 반환됩니다. 

 

 

42. 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 MFRIST when the program finishes execution?

A. 1234

B. sales

C. 5678

D. null

정답 : B

해설 : 변수에 대해 Group by를 실행했을 때, 각 변수의 그룹 (여기선 A와 B 두 그룹 존재) 의 첫 번째 값에는 First.division, 마지막 값에는 Last.division이 할당된다. 그러므로 1행과 3행에 First.division 논리가 성립되며, 매크로 함수 %let 에 의해 mfirst에 "salse"가 정의됩니다.

 

 

 

43. Which SQL procedure program deletes rows from the data set CLASS?

 

A. proc sql;

select * from class

where age<(select stop_age from threshold);

quit;

B. proc sql;

modify table class

delete where age<(select stop_age from threshold);

quit;

C. proc sql;

delete from class

where age<(select stop_age from threshold);

quit;

D. proc sql;

alter from class

delete where age<(select stop_age from threshold);

quit;

정답 : C

해설 : SQL의 쉬운 난이도 문제입니다. Delete 명령문은 delete from과 짝지어서 사용되므로 알아 두시기바랍니다. 

Version history
Last update:
‎06-15-2020 04:20 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