In reply to Manasi Chhabra.

You can ask SAS programming questions on the SAS Support Communities. Did you look up the MEAN and STD functions in the Base SAS doc? You can specify the 4 variables on an ARRAY stmt and then use the OF keyword in the MEAN and STD function. Or you can just specify the variable names in the functions.

data means;
set sashelp.iris;
/* specify the 4 variables on the next line */
array x[4] SepalLength SepalWidth PetalLength PetalWidth;
mean = mean(of x[*]);
std = std(of x[*]);
run;