LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2011, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 25 Feb 2011 09:14:51 -0600
Reply-To:     Charlie Huang <charlie.chao.huang@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Charlie Huang <charlie.chao.huang@GMAIL.COM>
Subject:      By statement in Proc Report
Content-Type: text/plain; charset=ISO-8859-1

Hi,

In Proc Format, if I use by statement, I will have such results:

proc sort data=sashelp.class out=one; by sex; run;

proc report data=one nowd; by sex; columns age n; define age/group; run;

-- Sex=F -----------

Age n 11 1 12 2 13 2 14 2 15 2

-- Sex=M -----------

Age n 11 1 12 3 13 1 14 2 15 2 16 1

If I want to have a uniformized table format for both gender and my desired result is like below, any way in Proc Report can do it? Many thanks.

-- Sex=F -----------

Age n 11 1 12 2 13 2 14 2 15 2 16 0

-- Sex=M -----------

Age n 11 1 12 3 13 1 14 2 15 2 16 1


Back to: Top of message | Previous page | Main SAS-L page