BookmarkSubscribeRSS Feed

SAS Ceritified Advanced Programmer 덤프 풀이 44-45

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

44. The following SAS program is submitted:

%macro one(input);

%two;

%put the value is &date;

%mend;

%macro two;

data _null_;

call symput('date','12SEP2008');

run;

%mend;

%let date=31DEC2006;

%one(&date)

What is the result when the %PUT statement executes?

A. A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the

ONE macro

B. A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the

TWO macro

C. A macro variable DATE with the value 12SEP2008 is retrieved from the global symbol table

D. A macro variable DATE with the value 31DEC2006 is retrieved from the global symbol table

정답 : C

해설 : 매크로변수에는 지역변수와 글로벌 변수가 있죠. 지역 변수는 Local Symbol에 저장되고, 글로벌 변수는 Global Symbol에 저장됩니다. Call Symput은 매크로 변수에 글로벌 값을 할당하는 역할을 합니다. (교재 345p 참고) 

 

 

 

45. Which one of the following techniques concatenates data in SAS?

A. the APPEND procedure

B. the DATA step with a MERGE statement

C. the DATA step with a COMBINE statement

D. the INTERSECT operator in the SQL procedure

정답 : A

해설 : 데이터 셋을 이어붙여주는 PROC 를 묻는 문제입니다. 이 경우 PROC APPEND 라는 명령어를 사용합니다. 데이터를 위 아래로 합쳐주는 역할을 하죠. Merge가 키값에 의해 위 아래로 조인을 시켜주는 명령어라면, APPEND는 냅다 붙여주는거라고 생각하면 됩니다. (교재 477p 참고)

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

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Article Labels
Article Tags