In addition to Scott's suggestion for PROC MEANS, you could also use PROC TABULATE.
One other item to take care of --- since RPTDT is a date field, you will want to use a FORMAT to restrict the RPTDT to YEAR level only (not use RPTDT down to the DAY level).
Last, if all you want is a report then using PROC MEANS or PROC TABULATE will be sufficient. You can use output sent to the LISTING window, if all you need is a plain report or you can use ODS to create HTML, RTF or PDF report output.
But, if you need to create a SAS dataset of the averages, then you will need to investigate either the ODS OUTPUT statement or the OUTPUT statement for PROC MEANS or the OUT= option for PROC TABULATE.
The example code below shows how to find the average height for each birth year and the average height for every year and gender combination. Documentation for PROC MEANS is here:
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a000146728.htm
TABULATE here:
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a000146759.htm
cynthia
[pre]
data bday;
infile datalines;
input name $ bday : yymmdd10. height gender $;
return;
datalines;
alan 1950/11/15 73 M
bob 1989/01/29 72 M
carl 1983/02/16 76 M
dana 1950/11/17 69 F
eliza 1989/01/19 64 F
fran 1983/02/18 65 F
george 1950/11/14 71 M
harry 1989/01/19 72 M
ian 1983/02/26 74 M
jacqie 1950/11/11 68 F
kathy 1989/01/19 67 F
lulu 1983/02/19 69 F
mark 1953/10/25 71 M
noah 1989/01/19 73 M
oliver 1983/02/26 75 M
paula 1950/11/29 65 F
quentin 1989/02/23 73 M
rosie 1984/03/17 66 F
tom 1953/10/12 75 M
uma 1989/02/19 68 F
victor 1983/02/26 72 M
wayne 1950/10/11 73 M
xavier 1989/03/13 76 M
yanni 1983/04/16 72 M
zenia 1984/10/16 54 F
;
run;
proc means data=bday mean;
title '1a) MEANS Average Height for each birth year';
var height;
class bday;
format bday year4.;
run;
proc means data=bday mean;
title '1b) MEANS Average Height for each birth year and gender';
var height;
class bday gender;
format bday year4.;
run;
proc tabulate data=bday;
title '2a) TABULATE Average Height for each birth year';
var height;
class bday;
format bday yymmdd2.;
table bday='Year',
height*n height*mean;
run;
proc tabulate data=bday;
title '2b) TABULATE Average Height for each birth year and gender';
var height;
class bday gender;
format bday yymmdd2.;
table bday='Year' * gender,
height*n height*mean;
run;
[/pre]