Difference Between SAS SUM Function And Using '+' Operator In SAS

Hi All,

Operators :   For any type of calculation, we all are much familiar with Division (/), Multiplication (*), Addition (+) and Substraction (-) which are known as operators. Whenever we are in need to do some calculation in SAS, we use operators. Operators are to do indicated operation between SAS variables or constant values.

Sum Function in SAS :- It returns the sum of non missing and missing arguments.

Ex:          Total = Sum (U,M,A);

Total =  Sum (of  U1 - U10) ;

Total = Sum ( U M A );

"+" Operator in SAS :- It returns a missing value if any of the values (arguments ) are missing.

Difference between SAS Procedure and SAS function

  •  SAS functions would be in need for argument values to be supplied across an observation in SAS dataset.

  •  SAS functions are already written ( pre-written) expressions which gives programming shortcuts for many manipulation and calculation of data

  •  SAS functions are for normal (common ) mathematical operations such as square root, natural log and many more....

  •  SAS Procedures would be in need for one argument value per observation in SAS dataset.

1 comment:

  1. it's really a piece of new information to me, I learn more from this blog, I want to learn more from this blog, keep on it doing, I eagerly waiting for your updates, Thankyou. other anyone wants to learn SAS course s contact here- +91-9311002620 or visit website- https://www.htsindia.com/Courses/business-analytics/sas-training-institute-in-delhi

    ReplyDelete