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 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 20 Dec 2004 07:15:57 -0800
Reply-To:   Dennis Diskin <diskin@SNET.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Dennis Diskin <diskin@SNET.NET>
Subject:   Re: help on reporting
Comments:   To: Ben <benpub7@YAHOO.COM>
In-Reply-To:   <200412181650.iBIGoUsl019002@listserv.cc.uga.edu>
Content-Type:   text/plain; charset=us-ascii

Ben,

The output structure does not lend itself to a straight proc report, but with a little preprocessing of the data you can get it (assuming that your data is well behaved):

data y; set x; by v1 v2 v6 v5; rv6 = v6; if not first.v6 then rv6 = ''; if v5 eq 'lab1' then rv3 = ' ' || left(put(v3,8.)); if v5 eq 'lab2' then rv3 = '(' || trim(left(put(v4,8.))) || ')'; run; proc report nowindows missing data=y; columns v1 v2 rv3 v5 rv6; define v1 / order order=internal; define v2 / order order=internal; quit;

HTH, Dennis Diskin

Ben <benpub7@YAHOO.COM> wrote: Thanks in advance.

/***************** mock up data *****************/

*******************************; *** report date **********; *******************************; data x; input v1 v2 $ v3 v4 v5 $ v6 $; datalines; 101 a1 12 45 lab1 sae1 101 a1 12 45 lab2 sae1 101 a1 12 45 lab3 sae1 101 a2 120 360 lab1 sae2 101 a2 120 360 lab2 sae2 101 a2 120 360 lab3 sae2 201 a1 24 32 lab1 201 a1 24 32 lab2 201 a1 24 32 lab3 201 a2 60 55 lab1 sae3 201 a2 60 55 lab2 sae3 201 a2 60 55 lab3 sae3 ; run;

***************************; **final report layout***; ***************************;

101 a1 12 lab1 sae1 (45) lab2 lab3 101 a2 120 lab1 sae2 (360) lab2 lab3 201 a1 24 lab1 (32) lab2 lab3 201 a2 60 lab1 sae3 (55) lab2 lab3 ********************************; ********************************;


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