BookmarkSubscribeRSS Feed

SAS Certified Advanced Programmer 덤프3 풀이 11-13

Started ‎09-01-2020 by
Modified ‎09-01-2020 by
Views 326

11.The variable attributes of SAS data sets ONE and TWO are shown below: 

ONE                                        TWO 

# Variable Type Len Pos          # Variable Type Len Pos 

2 sales Num 8 8                      2 budget Num 8 8 

1 year Num 8 0                       3 sales Char 8 16 

year Num 8 0 

 

Data set ONE contains 100 observations. Data set TWO contains 50 observations. Both data sets are sorted by the variable YEAR. The following SAS program is submitted:
 
data three;
merge one two;
by year; 
run; 
Which one of the following is the result of the program execution?

A. No messages are written to the SAS log.
B. ERROR and WARNING messages are written to the SAS log.
C. Data set THREE is created with two variables and 50 observations.
D. Data set THREE is created with three variables and 100 observations.

 

[정답]B

[풀이]

merge함수로 공통변수을 기준으로 행병합합니다.

data three로 one 테이블과 two테이블의 결합을 변수가 아난 값을 기준으로 병합해서 에러가 납니다.

 

 

12. Given the following SAS statement: 

 

%let idcode = Prod567; 

Which one of the following statements stores the value 567 in the macro variable CODENUM?

A. %let codenum = substr(&idcode,length(&idcode)-2);
B. %let codenum = substr(&idcode,length(&idcode)-3);
C. %let codenum = %substr(&idcode,%length(&idcode)-2);
D. %let codenum = %substr(&idcode,%length(&idcode)-3);

 

[정답]C

[풀이]

%substr(a,b,c) : a문자열을 b번째 자리부터, c개만큼의 문자를 읽습니다.

매크로에 '567'이 저장되어 있다고 한다면, %length(문자 길이 반환 함수) -2로 값을 찾을 수 있습니다.

%length-1이면567에서 6부터입니다.

 

 

13. The following SAS program is submitted:

 

 data new (bufsize = 6144 bufno = 4);
 set old; 
 run; 

 

Which one of the following describes the difference between the usage of BUFSIZE= and BUFNO= options?


A. BUFSIZE= specifies the size of the input buffer in bytes; BUFNO= specifies the number of input
buffers.
B. BUFSIZE= specifies the size of the output buffer in bytes; BUFNO= specifies the number of output
buffers.
C. BUFSIZE= specifies the size of the output buffer in kilobytes; BUFNO= specifies the number of input
buffers.
D. BUFSIZE= specifies the size of the output buffer in kilobytes; BUFNO= specifies the number of output
buffers.

 

[정답]B

[풀이]

*BUFNO=

Data Set의 옵션으로 특정한  Data Set buffers의 개수를 제어합니다.

System 옵션으로 모든 Data Set buffers의 개수를 제어합니다.

 

*BUFSIZE=

Data Set 옵션으로, BUFSIZE= 특정한 Data Set output buffer size를 제어합니다.

System 옵션으로, BUFSIZE= 모든 Data Set output buffer size를 제어합니다.

Version history
Last update:
‎09-01-2020 09:14 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