문제풀이/기타
SAS BASE Q32. input & if [수정]
나루다루
2018. 10. 30. 23:51
728x90
QUESTION NO: 32
Given the raw data file EMPLOYEE:
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
The following SAS program is submitted:
data test;
infile 'employee';
input employee_name $ 1-4;
if employee_name = 'Ruth' then input idnum 10-11;
else input age 7-8;
run;
What value does the variable IDNUM contain when the name of the employee is "Ruth"?
A. 11
B. 22
C. 33
D. (missing numeric value)
Answer: B
# 문제 수정
- 원데이터셋 이름 뒤에 공백이 2개.
# 문제 풀이
- input employee_name $ 1-4; : 문자형 변수로, 원데이터셋의 1~4번째 데이터를 읽는다.
728x90
반응형