Format:
set behavior() specialvalues(zero) on | off;
Description:
The set behavior specialvalues statement allows special values to be treated as zero (0) values during arithmetic operations, including addition, subtraction, multiplication, division, and modulo. By default this behavior is disabled. The set behavior statement affects all numeric data items from the point where it is executed onward. To limit its scope, it must be turned on and off at appropriate times.
Example:
PROC GLOBAL
numeric var1,var2,var3;
numeric result;
PROC SUMMATION
var1 = 5;
var2 = 10;
var3 = default;
set behavior() specialvalues(zero) on;
result = var1 + var2 + var3; // result will be 15
set behavior() specialvalues(zero) off;
result = var1 + var2 + var3; // result will be DEFAULT
See also: Special Values