Hi:
This seems like a job for PROC TABULATE, although, you would get the N and the PCTN in different columns. For example, SASHELP.CLASS is one of the sample datasets provided when you install SAS. It is a file of 19 students who range in age from 11-16. If you wanted to find the N and PCTN for each age (AGE) broken down by gender (SEX), you would use the following code:
[pre]
proc tabulate data=sashelp.class;
class age sex ;
table age all,
sex*(n*f=comma6. pctn) all*(n*f=comma6. pctn);
run;
[/pre]
which would result in this output:
[pre]
+--------+---------------------------------------+-------------------+
| | Sex | |
| |-------------------+-------------------+ |
| | F | M | All |
| |------+-------------------+-------------------+------------+
| | N | PctN | N | PctN | N | PctN |
|--------------------------------------------------------------------+
|Age | | | | | | |
|--------+ | | | | | |
|11 | 1| 5.26| 1| 5.26| 2| 10.53|
|--------------------------------------------------------------------+
|12 | 2| 10.53| 3| 15.79| 5| 26.32|
|--------------------------------------------------------------------+
|13 | 2| 10.53| 1| 5.26| 3| 15.79|
|--------------------------------------------------------------------+
|14 | 2| 10.53| 2| 10.53| 4| 21.05|
|--------------------------------------------------------------------+
|15 | 2| 10.53| 2| 10.53| 4| 21.05|
|--------------------------------------------------------------------+
|16 | .| .| 1| 5.26| 1| 5.26|
|--------------------------------------------------------------------+
|All | 9| 47.37| 10| 52.63| 19| 100.00|
+--------+------+------------+------+------------+------+------------+
[/pre]
By default PCTN gives you a percent of the GRAND TOTAL (19), but you can also ask for ROWPCTN (percent of ROW TOTAL) or COLPCTN (percent of COL TOTAL).
Here are some papers that introduce using PROC TABULATE:
http://www2.sas.com/proceedings/sugi30/258-30.pdf
http://www.scsug.org/SCSUGProceedings/2007/papers/how/HOW-Winn.pdf
http://www2.sas.com/proceedings/sugi30/127-30.pdf
http://www2.sas.com/proceedings/sugi25/25/iv/25p159.pdf
cynthia