BookmarkSubscribeRSS Feed

SAS Ceritified Advanced Programmer 덤프 풀이 13-15

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

13. The following SAS program is submitted:

%macro test(var);

%let jobs = BLACKSMITH WORDSMITH SWORDSMITH;

%let type = %index(&jobs,&var);

%put type = &type;

%mend;

%test(SMITH)

What is the value of the macro variable TYPE when the %PUT statement executes?

A. 3

B. Null

C. 6

D. 0

정답 : C

해설 : %index(X,Y)는 Y문자열을 X의 문자열 안에서 몇 번째로 탐색되는지 알려주는 기능을 합니다. 위에선 jobs의 문자열 안에 SMITH라는 문자가 몇 번째에 존재하는지 묻는 기능입니다.

즉, B , L , A, C, K ,"SMITH"는 6번째 문자에서 시작되므로 6이 답이 됩니다. 

 

 

 

14. The following SAS program is submitted:

data temp;

length a 1 b 3 x;

infile 'file reference';

input a b x;

run;

What is the result?

A. The data set TEMP is not created because variables A and B have invalid lengths

B. The data set TEMP is not created because variable A has an invalid length

C. The data set TEMP is created, but variable X is not created

D. The data set TEMP is created and variable X has a length of 8

정답 : B

해설 : length는 변수의 길이를 선언해주는 기능이 있으며, 1로 지정할 수 없습니다.

 

 

 

15. Which DICTIONARY table provides information on all the tables containing a variable named

LASTNAME?

A. DICTIONARY.COLUMNS

B. DICTIONARY.VARIABLES

C. DICTIONARY.MEMBERS

D. DICTIONARY.TABLES

 

정답 : A

해설 : 외워두시면 한 문제는 맞출 수 있는 내용입니다. DICTIONARY.COLUMNS은 말 그대로 컬럼(변수)에 관한 정보를 가진 default 테이블입니다. 이 테이블에서 어떤 테이블이 어떤 변수를 가지고 있는지 확인할 수 있습니다. DICTIONATY.VARIABLES 와 헷갈리시면 안됩니다. 

Version history
Last update:
‎06-15-2020 03:50 AM
Updated by:
Contributors

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Article Labels
Article Tags