| Date: | Mon, 5 Dec 2005 17:03:03 +0000 |
| Reply-To: | toby dunn <tobydunn@HOTMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | toby dunn <tobydunn@HOTMAIL.COM> |
| Subject: | Re: Data transformation question |
|
| In-Reply-To: | <1133801266.763284.45190@g49g2000cwa.googlegroups.com> |
| Content-Type: | text/plain; format=flowed |
|---|
Santosh,
Okay I would suggest an array approach. However, before we go there lets
stop and think about what you are doing. Why do you want the data in such a
denormalized form? Perhaps if you write back to the list explaining that we
could better help you. I have just spent the last week working with
denormilized data sets. This denormalized data form will make your code
extremely hard to work with, cause you to hard code variables in, and
finally create holy heck and havoc when you need to do something very
simple.
Toby Dunn
From: "santosh.k" <santosh.kothamsu@CHASE.COM>
Reply-To: "santosh.k" <santosh.kothamsu@CHASE.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Data transformation question
Date: Mon, 5 Dec 2005 08:47:46 -0800
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
Thanks,
Santosh
|