Exactly what I was looking for.
Chang Y. Chung wrote:
> On Thu, 6 May 2004 11:53:23 -0400, Mark Biek <markb@STEVENSONCOMPANY.COM>
>>I have a dataset that has the following columns:
>>ID Q8 Q9
>>I'm trying to come up with something so that I end up with a dataset
>>with a single column for all values of Q8 & Q9. I though proc transpose
>>might do it but I haven't had much luck that way.
>>What's the easiest way to combine the contents of 2 columns to make 1
>>column that has all values from both?
> Hi, Mark,
> There are many, many ways to this. I am afraid I don't know why one is the
> easiest. Here is one of the ways.
> /* test data */
> data old;
> id=1; q8=1; q9=10; output;
> id=2; q8=2; q9=20; output;
> /* a solution */
> data new;
> set old(keep=id q8 rename=(q8=q))
> old(keep=id q9 rename=(q9=q))
> /* check */
> proc print data=new;
> /* on lst
> Obs id q
> 1 1 1
> 2 2 2
> 3 1 10
> 4 2 20
The Stevenson Company
8700 Westport Rd. Ste. 200
Louisville, KY 40242-3100
(502) 429-9060 ext 251