SAS Base, A00-211 Crambible 

SAS 베이스 자격증 


QUESTION NO 42. 


describes the SAS automatic _ERROR_ variable?


A. The _ERROR_ variable contains the values 'TRUE' or 'FALSE.'
B. The _ERROR variable maintains a count of the number of data errors.
C. The _ERROR_ variable can be used in expressions or calculations in the DATA step. 

D. TheERROR_variable contains the number or the observation that caused the error.




에러가 나게되면 이 에러를 판단하는 진행과정이 있는데요. 에러가 없으면 0, 에러가 있으면 1을 갖는 시스템을 갖고 있습니다. 따라서 True & False값을 갖는건 아니고요. 갯수와는 상관 없고요. data step 중 계산과정에서 표현될 수 있습니다. 즉, do 의 반복문같은 경우, _ERROR_ = 1 이런결과를 가지고 에러 오류 처리하는데 활용될 수 있습니다. 예를들어 에러가 있으면 do 반복문 빠져나와라..이런식으로요. 


Answer: C 



반응형

SAS Base, A00-211 Crambible 

SAS 베이스 자격증 


QUESTION NO: 41


The following SAS program is submitted:

data work.test;
set work.staff (keep = jansales febsales marsales); 

array diff_sales{3} difsales1 - difsales3;
array monthly{3} jansales febsales marsales;
run;


What new variables are created?


A. JANSALES, FEBSALES and MARSALES
B. MONTHLY1, MONTHLY2 and MONTHLY3
C. DIFSALES1, DIFSALES2 and DIFSALES3
D. DIFF_SALES1, DIFF_SALES2 and DIFF_SALES3



새롭게 생성되는 변수는 무엇인지 찾는 문제입니다. keep을 이용해서 세가지 변수, jansales febsales marsales를 가져오려는데요. 다음 문장에서 array를 선언하게 됩니다.


array diff_sales{3} difsales1 - difsales3; 
   - diff_sales라는 이름을 가진 array인데요. {3}은 해당 array의 길이를 말해서 difsales 1, 2, 3를 정의하고 있습니다.  

array monthly{3} jansales febsales marsales;

   - monthly라는 이름을 가진 array이고 기존에 있는걸 그대로 불러왔습니다.


이때 diff_sales & monthly라는 이름이 새롭게 만들어진거고 그 안에 있는 array구성원은 위에 정의된것처럼 불러오게 되는것입니다. 


Answer: C 


반응형

SAS Base, A00-211 Crambible 

SAS 베이스 자격증 


QUESTION NO: 40


What is the purpose or the MISSOVER option on the INFILE statement?


A. It prevents SAS from loading a new record when the end of the current record is reached.

B. It enables SAS to scan the input data records until the character string that is specified in the @'character-string' expression is round.

C. It enables SAS to continue to read the next input data record if it does not find values in the current input tine for all the variables in the statement.

D. It causes the DATA step to stop processing if an INPUT statement reaches the end of the current record without finding values for all variables in the statement.




infile statement에서 MISSOVER의 목적이 뭔지 찾는 문제입니다. 답은 A고요. 현재 record를 끝난 다음에 new record를 로딩하도록 해주는 옵션입니다. 


데이타를 불러올때 missing value가 있을때 MISSOVER의 옵션이 없으면 missing value값이 제대로 표현되지 않고 데이타가 밀려서 들어오게 되는데요. 이렇게 missing value가 있는 데이타를 불러올때 MISSOVER옵션을 사용해야합니다. 



Answer: A 


반응형

SAS Base, A00-211 Crambible 

SAS 베이스 자격증 


QUESTION NO: 39


The following SAS program is submitted: 

proc format
value score 1 - 50 = 'Fail'
51 - 100 = 'Pass';

run;


proc report data = work.courses nowd; 

column exam;
define exam / display format = score.

run;


The variable EXAM has a value of 50.5.

How will the EXAM variable value be displayed in the REPORT procedure output?


A. Fail
B. Pass
C. 50.5
D. . (missing numeric value)


value를 선언해서 score를 새롭게 정의하고자 합니다. 이때 format이 1에서 50까지 Fail로 바꿔주고, 51에서 100까지는 Pass라고 포맷을 바꿔주게 됩니다. 


해당 데이타에서 column exam 을 적용하려고 합니다. score를 display하려고 합니다. 이때 exam 값은 50.5인데요. 어떠한 형태로 보여질 지 찾는건데요. 


50.5는 정의가 되지 않은 형태, 즉 fail에도 들어가지도 않고, pass도 들어가지 않아서 해당포멧을 적용해도 그냥 값이 그대로 나오게 됩니다. 



Answer: C 


반응형

SAS Base, A00-211 Crambible 

SAS 베이스 자격증 


QUESTION NO: 38


Given the SAS data set EMPLOYEE INFO:

EMPLOYEE_INFO


The following SAS program is submitted: 

proc sort data = employee_info;

<insert BY statement here>
run;


Which BY statement completes the program and sorts the data sequentially by ascending expense values within each ascending IDNUMBER value?


A. by ExpensesIDNumber;
B. byIDNumber Expenses;
C. by ascending ExpensesIDNumber;
D. by ascendingIDNumber ascending Expenses;


proc sort을 이용해서 데이타를 정렬하려고 하는데요. IDNUMBER를 오름차운으로 정렬한것 내에서 다시 expense value를 오름차순으로 정렬하려고 합니다. 그러니 by의 default 값 오름차순으로 되어있어서 오름차순 순서대로 변수명을 적어주면 됩니다. 


Answer: B 


반응형

+ Recent posts