BookmarkSubscribeRSS Feed

SAS Ceritified Advanced Programmer 덤프 풀이 71-73

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

71. Which SAS integrity constraint type ensures that a specific set or range of values are the only values in a variable?

 

A. CHECK

 

B. NOT NULL

 

C. PRIMARY KEY

 

D. UNIQUE

 

 

 

[정답]A

[풀이]

CHECK옵션이 변수의 유일값을 확인하는 옵션입니다.

A. Primary key는 SQL에서 나온 개념으로 테이블 내 동일한 레크도가 입력되는 경우 구븐하기 위해 식별자를 사용하는데 각 테이블마다 단 하나씩만 설정할 수 있다.

 

 

 

72. The following SAS program is submitted:

%let test=one;

%let one=two;

%let two=three;

%let three=last;

%put what displays is &&&&&test;

 

What is the written to the SAS log?

A. What displays is three

B. What displays is two

C. What displays is one

D. What displays is last

 

 

 

[정답] B

[풀이]

SAS 매크로에는 변수의 이름에는 ‘&’가 붙고 매크로 이름에는 ‘%’ 붙혀 사용됩니다.

 

단골출제 문제로 &의 참조 개수에 따른 참조 위치를 묻는 문제입니다.

 

‘Forward Re Scan Rule’이라고 합니다. 한번 더 스캔한다는 규칙으로 두 번 참조시 매크로 프로세서는 && 두 개를 & 한 개로 인식하기 때문에, 두 번 참조를 위해선 &&& 이렇게 세 개로 써주셔야 합니다.

 

이 규칙은 왼쪽에서 오른쪽으로 가고, 괄호를 사용하여 표시하면 쉽게 풀 수 있습니다.

 

 

(&&)(&&)(&test)

 

(&) (&) (&test)

 

&&one

 

(&&)(one)

 

(&)(one)

 

&one

 

Two

 

 

 

 

 

73. 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. The variables named POINTS10, POINTS15, POINTS20, POINTS25, POINTS30, POINTS35 are created in the PDV

B. No variables are created in the PDV

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

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

 

 

 

[정답]C

[풀이]

Array는 여러 변수들을 같은 방식으로 처리할 필요가 있을 때, array문을 사용하여 그 변수들을 한 배열의 원소들로 정리할 수 있습니다.

 

 

[arrary statement 정의]

  

SE22020040323552670.png

 

Array 배열이름 {행,열};로 2*6의 temp 테이블이 만들어집니다.

Array-name을 points로 했으니 points1-points6이 변수의 이름이 됩니다. 

 

 

SE22020040323554270.png

 

 

 [출력 데이터]

 

SE22020040323561070.png

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