-1

I'm new to sas and not able to figure what this statement does in the data step

sum(column1, -(col2 * col3))
  • That is not a statement. It might be part of a statement, but even then it is missing a closing right parenthesis. – Tom Apr 09 '20 at 04:04
  • Depends on where it is. That could be in SQL, data step or IML. And it could have different meanings in some of those depending on other things. So it depends. – Reeza Apr 09 '20 at 04:31

1 Answers1

0

The SUM function returns the sum of the non-missing argument values.

Adding a negative summand expression to column1 is the same as subtracting the expression from column1. The expression (col2*col3) itself could be missing, negative, 0, or positive.

The maths analog would be

result = column1 + -(col2*col3), being the same as
result = column1 - col2*col3
Richard
  • 25,390
  • 3
  • 25
  • 38