LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 16 Dec 2002 20:58:53 -0500
Reply-To:     "Karl K." <karlstudboy@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Karl K." <karlstudboy@HOTMAIL.COM>
Subject:      Re: Proc REPORT question

"Richard A. DeVenezia" <radevenz@ix.netcom.com> wrote in message news:I3sL9.605$je6.315@tornadotest1.news.pas.earthlink.net... > I have some data that I can't seem to get report the way I want. > The following code is close, but each 'row' I want is shown spread down two > rows.

<snip>

The first thing is that L2 and L3 need to be defined as "group" vars. You can add an "order=whatever" option, if necessary. The 2nd thing is trickier. Someone (I believe it was Roland) was writing about this Proc Report quirk in SAS-L about a month ago. You need a dummy numeric variable to the right of your character variables. I'm unsure why.

I created a dummy variable in your datastep with a retain statement, and then changed the Proc Report step to:

proc report nowindows data=foo; by L1; column L2 L3 item,L4 dummy; /* this line changed to add dummy*/ define L2 / group; /* this line changed to group*/ define L3 / group; /* this line changed to group*/ define L4 / across order=data; define item / ' '; define dummy / analysis sum noprint; /* this line added */ run;

It produced what I believe you're looking for. There probably are more elegant solutions.

Karl


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