Date: Thu, 9 Nov 2006 17:30:05 +0100
Reply-To: Gwenael Besnier <gwen_1973@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gwenael Besnier <gwen_1973@HOTMAIL.COM>
Subject: Re: Changing a group of column names
In-Reply-To: <1163089334.313812.298680@i42g2000cwa.googlegroups.com>
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Hi,
seems to do what you want:
data toto;
_1=1; _2=2; _3=3; output;
run;
%macro doit;
%do i=1 %to 3;
_&i.=M&i.
%end;
%mend;
data tata;
set toto;
rename %doit;
run;
HTH
Gwen
>From: seema.pai@GMAIL.COM
>Reply-To: seema.pai@GMAIL.COM
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: Changing a group of column names
>Date: Thu, 9 Nov 2006 08:22:14 -0800
>
>Hi All,
>
>I have a sas dataset with a bunch of variable names called _1 to _256.
>I need to change these to be called M1 to M256. Is there a quick and
>easy way to do this?
>
>thanks in advance,
>Seema
_________________________________________________________________
Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar mit
Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt neu!
http://desktop.msn.de/ Jetzt gratis downloaden!