That's really smart !
Before, when faced with this kind of problem, I would,
from the var window, markblock, copy and then
paste the columns into the program editor
but that seems to have become far to complex in these gui displaymanager days.
Your method's arrival is most timely !
many thanks and
Datum: 26/04/2001 16:26
Antwort an: firstname.lastname@example.org
Betreff: A small SAS tip: Renaming large numbers of variables
I know this type of query comes up here every now & then, and the
solutions I've generally seen involve writing somewhat complex macros.
I'm sure I'm not the first to stumble over this alternative, but FWIW
here it is. It's suitable for the situation where the new names
resemble the old names except for the last few characters.
I had a dataset containing hundreds of numeric variables, the names of
which all of which end in the digit "3". My problem was to rename all
these 3s to 1s.
I've taken the macro route before, but it always seems to take me
quite some time to get it working properly. This time I instead wrote
the following little program:
array allvar _numeric_;
do over allvar; put allvar= 1. +(-2) allvar= 1. +(-4) '1 '; end;
and then simply pasting the resulting text from the log into the place
I've marked with an asterisk in a 2nd simple program
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.