Date: Mon, 27 Aug 2007 14:09:55 +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: Concatenate variable names from three datasets
In-Reply-To: <801ECCAF8F6D0D4C8913492E4EC8F5F8D9B7@SESORDEMBX01.rd.astrazeneca.net>
Content-Type: text/plain; format=flowed
Andreas ,
SAS has a 32 char limit of variable names so what you are asking for may not
be possible if the total length of the concatenated values is longer than 32
characters.
On the chance that they arent all you need to do is join the tables
together, then create an array for each and finally use the CatS function to
join the values together. One you have that you can simply load the values
into a MAcro var and refernece away in a data step.
Toby Dunn
Two wrongs are only the beginning.
Success always occurs in private and failure in full view.
Experience is something you don't get until just after you need it.
From: "Lindberg, Andreas" <Andreas.Lindberg@ASTRAZENECA.COM>
Reply-To: "Lindberg, Andreas" <Andreas.Lindberg@ASTRAZENECA.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject: Concatenate variable names from three datasets
Date: Mon, 27 Aug 2007 15:42:27 +0200
I have three datasets, each with a single row and 42 columns named F1-F42.
Let's call them set one, two and three. I want to create a new empty dataset
with 42 columns where the column names are the concatenated values (text) of
the same column in each of the three datasets. So the first column in the
new dataset would be called "ValueOfF1inSet1ValueOfF1inSet2ValueOfF1inSet3"
and the second column would be called
"ValueOfF2inSet1ValueOfF2inSet2ValueOfF2inSet3" and so on up to column 42.
Any Ideas?
Vänliga hälsningar/Best Regards
Andreas Lindberg
_________________________________________________________________
Booking a flight? Know when to buy with airfare predictions on MSN Travel.
http://travel.msn.com/Articles/aboutfarecast.aspx&ocid=T001MSN25A07001