The following SAS program is submitted:
data WORK.TEST;
set WORK.PILOTS;
if Jobcode=’Pilot2′ then Description=’Senior Pilot’;
else Description=’Unknown’;
run;
The value for the variable Jobcode is: PILOT2. What is the value of the variable Description?
A. PILOT2
B. Unknown
C. Senior Pilot
D. ‘ ‘ (missing character value)
Answer: B
注解:字符串的大小写是有区别的,所以PILOT不等于Pilot,执行ELSE之后的表达式。