Creating Variables/Columns in SAS Dataset

Creating Variable/Column- We have to write a equation to create a new Variable/ Columns.

L.H.S(Left hand side)=R.H.S(Right hand side)

LHS part should be the variable/column name which we wants to
create. RHS Part has to be a logic or value.


Data a;
set sasuser.admit;

In this example a new Dataset 'A' is created and have all the variables and observation from SASUSER.ADMIT, and we created two new variables 'x' and 'age_m'. x will have value 5 in all the observation and age_m will be calculating value from age variable.