Can proc summary in SAS analyze more than one variables at a time?

Solution for Can proc summary in SAS analyze more than one variables at a time?
is Given Below:

If I am interested in median of multiple variables (var1, var2, var3), do I have to analyze them one by one?

proc summary data=data median nway;
var var1;
class c1 c2 c3;
output out=medians(drop=_:) median=var1_median;
run;

Yes, add them to the VAR list, note the <s> in the documentation which indicates it can handle multiple variables. You can also use shortcut variable lists. The documentation has an example.

VAR variable(s) </ WEIGHT=weight-variable>;

MEANS and SUMMARY procs are fairly interchangeable and MEANS is slightly better documented. In fact the SUMMARY VARS documentation links back to the MEANS proc.

proc summary data=data median nway;
var var1 var2 var3-var8 var11--var14;
class c1 c2 c3;
output out=medians(drop=_:) median= / autoname;
*if no autoname option;
*output out=medians(drop = _:) median = var1_median var2_median
var3_median ...... ;
run;

If you are doing multiple variables at once, look at the AUTONAME/AUTOLABEL options as well as the STACKODS option to control your output.

Doc references:
Summary docs

Means doc

Include them in the VAR statement. To write the results to result dataset make sure you either list the same number of names.

var var1 var2 ;
output out=medians medians=median_var1 median_var2 ;

Or no names, in which case they will use the original names.

output out=medians medians= ;

You can also add the autoname option. That is usefull if you need names for other statistics.

output out=stats min= max= mean= medians= / autoname ;