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 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 5 Dec 2005 12:01:28 -0800
Reply-To:     David L Cassell <davidlcassell@MSN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         David L Cassell <davidlcassell@MSN.COM>
Subject:      Re: Data transformation question
In-Reply-To:  <200512051649.jB5GK88b013584@mailgw.cc.uga.edu>
Content-Type: text/plain; format=flowed

santosh.kothamsu@CHASE.COM wrote back: >Let me transform my question: > >I have a SAS dataset in the following form. >cat cycle field pass miss >dm 5008 bal 10 15 >dm 5009 bal 12 20 >dm 5010 bal 15 9 >ib 5009 chg 5 12 >ib 5010 chg 6 11 >ob 5008 bal 10 15 >ob 5009 bal 12 20 >ob 5010 chg 12 13 > >I need to create a SAS dataset in the following form: >1) grouped by 'cat' and 'field' >2) ' pass' and 'miss' values spread across as observations for each >field >Attached is the template > >cat field p5008 p5009 p5010 m5008 m5009 m5010 >dm bal 10 12 15 15 20 9 >ib chg . 5 6 . 12 11 >ob bal 10 12 . 15 20 . >ob chg . . 12 . . 13

At this point, I have to speculate that you should NOT transform your data set at all. Your problem looks more and more like a data presentation problem. I suggest that you look at PROC REPORT or PROC TABULATE to display your data in the form that you are seeking. try NOT to muck up your data when all that is needed is a way to display it differently.

If it turns out that someone is holding a gun to your head and forcing you to create this monstrosity for an Excel spreadsheet, then the above suggestion still works, because you can grab your PROC REPORT or TABULATE output using ODS and shove it into a handy data set to hurl at PROC EXPORT.

HTH, David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330

_________________________________________________________________ Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/


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