SAS Base Programming for SAS 9 — Question 26
The following SAS program is submitted:
data test;
set chemists;
jobcode = Chem2
then description = Senior Chemist;
else description = Unknown;
run;
The value for the variable JOBCODE is:
JOBCODE -
-------------
chem2
What is the value of the variable DESCRIPTION?
Answer options
- A. chem2
- B. Unknown
- C. Senior Chemist
- D. ‘ ‘ (missing character value)
Correct answer: B
Explanation
The variable JOBCODE is set to Chem2, which does not meet the condition for assigning 'Senior Chemist' to DESCRIPTION, leading the program to assign 'Unknown' instead. The other options do not reflect the logic of the SAS program, making B the correct choice.