28. Which one of the following is the purpose of the REUSE=YES option in a compressed SAS data set?
A. It temporarily compresses observations in a SAS data set.
B. It allows users to update the same SAS data set concurrently.
C. It allows new observations to be inserted wherever enough free space exists.
D. It specifies that a new empty data set with a given name replaces an existing data set with the
same name.
정답 : C
해설 : REUSE = YES 옵션을 묻는 문제입니다. 위 옵션은 데이터가 새로 들어오거나 업데이트 되었을 때, 남은 공간을 재사용하여 최적화 해주는 기능을 합니다. 교재 703페이지 참고
29. When is it appropriate to create indexes on a SAS data set for efficient processing?
A. if small subsets of data are often retrieved
B. if the key variable has very few unique values
C. if the data are often used for BY group processing
D. if the SAS data set file page count is less than three pages
정답 : A
해설 : 인덱스를 언제 사용해야 효율적인지 묻는 문제입니다. 인덱스 장점은 다음과 같습니다. (230p참조)
•A small subset of data (<15% of rows) can be accessed more quickly. (As the size of the subset increases, the advantage of using an index decreases.)
•Equijoins can be performed without internal sorts.
•Uniqueness can be enforced by creating a unique index.
큰 비중을 차지하는 데이터셋을 인덱스로 지정하는 것은 인덱스를 지정하고 저장하는 것 또한 적잖은 비용이 들기 때문에 비효율적입니다.
30. The following SAS program is submitted:
%macro execute;
<insert statement here>
proc print data = sasuser.houses;
run;
%end;
%mend;
Which of the following completes the above program so that it executes on Tuesday?
A. %if &sysday = Tuesday %then %do;
B. %if &sysday = 'Tuesday' %then %do;
C. %if "&sysday" = Tuesday %then % do;
D. %if '&sysday' = 'Tuesday' %then %do;
정답 : A
해설 : SYSDAY 매크로 변수를 사용했을 때 어떤 양식으로 사용할 지 묻는 문제입니다. 어떠한 Quotes 도 들어가지 않습니다. sysday는 변수 자체를 날짜로 인식하기때문에 변수를 문자형으로 취급하지 않습니다. 그러므로 정답은 A가 됩니다. SYSDAY(시스템 날짜)가 목요일일 때 함수를 실행하라는 매크로네요.
(교재292참조)
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.