The SUM function adds two (or more) values
In this case, it adds the value of this date
"&rpt_run_dt."d
and the negative of the value of variable DATE. Essentially this is a subtraction, but because it is in the SUM function, a missing is treated as zero and then the SUM function does not return a missing if one of the values is missing.
By the way, those "curly" quotes in your code snippet will cause an error and should never be used. Use "straight" quotes as I did above.
By the way, I assume that rpt_run_dt is a macro variable even though you didn't use the & because if not, then this won't work either, the period immediately after rpt_run_dt will cause an error if it is not a macro variable.
Please type carefully!
--
Paige Miller