less than $60,000. The other customer wants to view a list of homes selling for
greater than $100,000.
Assuming the PRICE variable is numeric, which one of the following PRINT
procedure steps will select all desired observations?
A. proc print data = sasuser.houses;
where price lt 60000;
where price gt 100000;
run;
B. proc print data = sasuser.houses;
where price lt 60000 or price gt 100000;
run;
C. proc print data = sasuser.houses;
where price lt 60000 and price gt 100000;
run;
D. proc print data = sasuser.houses;
where price lt 60000 or where price gt 100000;
run;
答案是B 但是我认为A是不是也可以?
2.
The following SAS program is submitted:
data work.test;
Author = 'Agatha Christie';
First = substr(scan(author,1,' ,'),1,1);
run;
Which one of the following is the length ofthe variable FIRST in the output data
set?
A. 1
B. 6
C. 15
D. 200
Answer: D
为什麽答案是D?
3.
The following SAS program is submitted:
data work.test;
Title = 'A Tale of two Cities, Charles j.Dickens';
Word = scan(title,3,' ,');
run;
Which one of the following is the value of the variable WORD in the output data
set?
A. T
B. of
C. Dickens
D. ' ' (missing character value)
Answer: B
为什麽答案是B?
4.
The following SAS DATA step is submitted:
data work.accountting;
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. 8
C. 12
D. The length can not be determined as the program fails to execute due to errors.
Answer: A
为什麽答案是A不是C?
5.
The following SAS program is submitted:
data work.staff;
JobCategory= 'FA';
JobLevel= '1';
jobCategory= JobCategory || JobLevel;
run;
Which one of the following is the value of the variable JOBCATEGORY in the
output data set?
A. FA
B. FA1
C. FA 1
D. ' ' (missing character value)
Answer: A
为什麽答案是A不是B或者C?原理是什麽?
6.A SAS PRINT procedure output of the WORK.LEVELS data set is listed below:
Obsname level
1 Frank 1
2 Joan 2
3 Sui 2
4 Jose 3
5 Burt 4
6 Kelly .
7 Juan 1
The following SAS program is submitted:
data work . expertise;
set work. levels;
if level = . then
expertise = 'Unknown';
else if level = 1 then
expertise = 'Low';
else if level = 2 or 3 then
expertise =' Medium';
else
expertise = 'High';
run;
Which of the following values does the variable EXPERTISE contain?
A. Low, Medium, and High only
B. Low, Medium, and Unknown only
C. Low, Medium, High, and Unknown only
D. Low, Medium, High, Unknown, and ' ' (missing character value)
为什麽答案是B 不是C?
谢谢!



雷达卡



京公网安备 11010802022788号







