BookmarkSubscribeRSS Feed

SAS Ceritified Advanced Programmer 덤프 풀이 25-27

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

25. Given the following SAS data set ONE:

ONE

NUM VAR

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

1 A

2 B

3 C

Which one of the following SQL programs deletes the SAS data set ONE?

A. proc sql;

delete table one;

quit;

B. proc sql;

alter table one;

drop num, var;

quit;

C. proc sql;

drop table one;

quit;

D. proc sql;

delete from one;

quit;

정답 : C

해설 : 데이터 셋을 지우는 명령어를 묻는 문제입니다. DROP은 데이터 셋을 삭제하고, Delete는 원치 않는 데이터 (rows)를 삭제해 줍니다.

 

 

 

26. 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. No variable are created in the PDV

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

C. The variables named POINTS1, POINTS2, POINTS3 POINTS4, POINTS5, POINTS6 are created in the

PDV

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

정답 : C

해설 : PDV에 관해 묻는 문제입니다. PDV란 Program Data Vector 이고, 최적화 과정에 빈출되므로 꼭 알아두어야 합니다. SAS 는 데이터를 처리하는 Compilation 과정에서 데이터를 벡터로 인식하여 처리합니다. INPUT -> PDV -> OUTPUT 로직으로 처리하죠. PDV에선 데이터 변수값 각각을 처리하게되는데, 배열이 6개 생성되므로 point1 - 6 이라는 변수들이 생성됩니다. 

  

 

27. The following SAS program is submitted:

%macro loop;

data one;

%do i=1 %to 3;

var&i=&i;

%end

run;

%mend;

%loop

After this program executes; the following is written to the SAS log:

(LOOP): Beginning execution

(LOOP): %DO loop beginning; index variable l; start value is 1; stop value is 3; by value is 1

(LOOP): %DO loop index variable l is now 2; loop will iterate again

(LOOP): %DO loop index variable l is no 3; loop will iterate again

(LOOP): %DO loop index variable l is no 4; loop will iterate again

(LOOP): Ending execution

Which SAS system option displays the notes in the SAS log?

A. SYMBOLGEN

B. MLOGIC

C. MACRO

D. MPRINT

정답 : B

해설 : SAS log에 Macro 실행과정을 출력하는 옵션을 묻는 문제입니다. SAS log에 위와 같이 매크로의 생성, 변경, 계산의 과정이 전체적으로 출력되는 옵션은 MLOGIC 입니다. Macro의 산출 Logic을 나타낸다는 뜻이죠.

OPTIONS MLOGIC ;

이런식으로 써줍니다. 참고로 MPRINT는 SAS코드를 그대로 LOG에 찍어줍니다. MLOGIC과 같이사용하면 어떤 코드가 어떤 식으로 산출되는지 볼 수 있습니다. 

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