Q: (Creating a summary data set) I have a data set that provides the characteristics of individuals from several different countries (or counties or schools...). I want to generate a new data set that contains the average characteristics of individuals from each country.

A: This task got a lot easier when SAS introduced the output delivery system (ODS). Example code is given below. The input data set contains the weight (in pounds) of various people from two different countries. The output data set contains the mean and median weight for each country. (Other summary statistics, provided they are available through PROC MEANS, could be generated as well.)
 

data people;
 input country $ person $ weight;
datalines;
 usa FatAlbert 2000
 usa WeirdHarold 80
 gaul Asterix 50
 gaul Obelix 500
;
run;

proc means data=people mean;
 ods output Summary=country_means;
 class country;
run;

proc print data=country_means;
run;

ODS works with every SAS procedure and is a useful way to process, screen, and format your output before you look at it or paste it into a table. For an introduction to the output delivery system, see the SAS documentation.