equivalent of sum of columns in SAS

Today, I will discuss about “How to design SAS code which is equivalent of sum of columns in database. Consider the below employee details.

In order to get sum of Year-2019 and Year-2020, we need to use add (+) operator to achieve the same. See the below Query and data for the same.

Here, i applied ,normal addition, sum using ISNULL function, difference using absolute(ABS) function.

In order to achieve the same in SAS . Create the same Datasets . See the below Screen Shot for the same.

Now, create code to have sum of Year-2019 and Year-2020.

See the final output for the same.

Related posts