SAS Certified Base Programmer 123 Questions (61)
The following SAS program is submitted:
data work.passengers; if OrigPassengers = . then OrigPassengers=100; TransPassengers= 100; OrigPassengers= .; NonPaying= 10; TotalPassengers= sum (OrigPassengers, TransPassengers); run;
Which one of the following is the value of the TOTALPASSENGERS variable in the output data set?
A. 100
B. 110
C. 200
D. . (missing numeric value)
Topics:
SAS Base Questions |
4 Comments »
A
how answer is A? could you please clarify
above answer is wrong answer should be D missing value .
answer is A
add the statement
put TotalPassengers=;
to convince yourself. The sum() function behaves differently than explicit arithmetic statements. Sum() would treat any missing value as if they are zeros.