Date: Wed, 2 Apr 2003 13:30:49 -0500
Reply-To: Charles Patridge <Charles_S_Patridge@PRODIGY.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Charles Patridge <Charles_S_Patridge@PRODIGY.NET>
Subject: Re: how to transfrom SAS data structure
Samuel,
Venky is correct in stating Proc Transpose -
You might also wish to see more about Transpose
SAS FAQ: How can I transpose all of the variables in my data set, both
numeric and character?
Without a VAR statement, the TRANSPOSE procedure transposes all numeric
variables in the input data set that are not listed in another statement.
However, character variables to be transposed must be listed in a VAR
statement. This can be promblematic if you have many character variables
(or even one character variable along with numerous numeric variables) that
you need to transpose, and you don't want to type out what could become a
lengthy VAR statement. A macro from S AS Technical Support can help.
Read more at http://support.sas.com/techsup/faq/base/tranproc2055.html
Bits and Bytes: Transposing a Data Set
There are two ways to transpose a data set. You can use a DATA step, or you
can use the TRANSPOSE procedure. The DATA step gives you more control and
flexibility. The code for PROC TRANSPOSE is easier to write. You should
choose your method based on your SAS skills, the data you're working with,
and your desired output. In this Bits and Bytes column, author and SAS
instructor Melinda Thielbar provides a detailed description and comparison
of both methods so you can decide which one best suits your needs.
Read more at
http://www.sas.com/service/techtips/bitsandbytes/transpose.html
http://www.sconsig.com/sastips/TIP00052.htm - Re-Shaping Your Data with
Proc Transpose
HTH,
Charles Patridge
Email: Charles_S_Patridge@prodigy.net
|