SASInstitute SAS base programming 認定 A00-201 試験問題:
1. The following SAS DATA step is submitted:
data work.accounting;
set work.department;
length jobcode $ 12;
run;
The WORK.DEPARTMENT SAS data set contains a character variable named JOBCODE with a length of 5.
Which one of the following is the length of the variable JOBCODE in the output data set?
A) 5
B) The length can not be determined as the program fails to execute due to errors.
C) 8
D) 12
2. Which one of the following statements is true regarding the SAS automatic _ERROR_ variable?
A) The _ERROR_ variable contains the values 'ON' or 'OFF'.
B) The _ERROR_ variable contains the values 'TRUE' or 'FALSE'.
C) The _ERROR_ variable can be used in expressions or calculations in the DATA step.
D) The _ERROR_ variable is automatically stored in the resulting SAS data set.
3. The contents of the raw data file EMPLOYEE are listed below:
----|----10---|----20---|----30
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;
Which one of the following values does the variable IDNUM contain when the name of the employee is "Ruth"?
A) 11
B) 32
C) 22
D) . (missing numeric value)
4. The following SAS program is submitted:
data work.test;
Author = 'Christie, Agatha';
First = substr(scan(author,2,' ,'),1,1);
run;
Which one of the following is the value of the variable FIRST in the output data set?
A) A
B) ' ' (missing character value)
C) C
D) Agatha
5. The SAS data set named WORK.TEST is listed below:
Which one of the following SAS programs created this data set?
A) data work.test;
capacity = 150;
if 100 le capacity le 200 then
do;
airplanetype = 'Large';
staff = 10;
else
do;
airplanetype = 'Small'; airplanetype = 'Small';
staff = 5;
end;
run;
B) data work.test;
capacity = 150;
if 100 le capacity le 200 then
do;
airplanetype = 'Large';
staff = 10;
end;
else
do;
airplanetype = 'Small';
staff = 5;
end;
run;
C) data work.test;data work.test;
capacity = 150;
if 100 le capacity le 200 then;
airplanetype = 'Small'; airplanetype = 'Small';
staff = 5;
else;
airplanetype = 'Large'; airplanetype = 'Large';
staff = 10;
run;
D) data work.test;
capacity = 150;
if 100 le capacity le 200 then
airplanetype = 'Large' and staff = 10;
else airplanetype = 'Small' and staff = 5;
run;
質問と回答:
質問 # 1 正解: A | 質問 # 2 正解: C | 質問 # 3 正解: C | 質問 # 4 正解: A | 質問 # 5 正解: B |