Date: Mon, 14 Jul 2008 08:50:18 0400
ReplyTo: "Howard Schreier <hs AT dcsug DOT org>"
<schreier.junk.mail@GMAIL.COM>
Sender: "SAS(r) Discussion" <SASL@LISTSERV.UGA.EDU>
From: "Howard Schreier <hs AT dcsug DOT org>"
<schreier.junk.mail@GMAIL.COM>
Subject: Re: Understanding Proc Transpose
On Mon, 14 Jul 2008 05:35:25 0700, Takeadoe <mtonkovich@MSN.COM> wrote:
>Good morning,
>
>I was hoping someone might lend a hand with a Proc Transpose
>question. I don't understand why it generated the results that it
>did. Here is a snapshot of the data before I ran Proc Transpose.
>Note, there are probably 100+ variables in the data set, I've only
>included a few of them.
>
>MatchID 200_00 200_01 200_02 212_06 212_07 220_00 220_01 ...
>54
>100
>212
>45
>...
>
>code:
>Proc Transpose;
>var 200_00 200_01 (all variables in the dataset other than MatchID,
>which represented unique customers)
>by MatchId;
>
>I did not use a variable for new column name(s).
>
>I expected to see a 3variable dataset consisting of MatchID Source
>and Column. Instead, I ended up with a 5variable dataset that
>included MatchId Source _1 _2 _3. Some records had values for _1,
>others _2, and yet others _3. What caused this? Why were there 3 new
>variables (_1, _2, _3) instead of just 1?
>
>One other item worth noting. Values for the variables were either 0,
>1, ".", or part the name of the variable such as 222 or 212.
>
>Any help at all would really be appreciated.
>
>Thank you in advance.
>
>Mike
At least one of your MatchID values repeats 3 times.
