|
Mark, try as I might I was unable to see any spaces. I retyped all dataset, however, but got the same output: while death_year and death_month were sucessfully renamed, death_place and place-death were not......No idea what it might be...Had broken my head...
Irin
From: Terjeson, Mark <Mterjeson@RUSSELL.COM>
Subject: Re: Failure to rename certain fields
To: SAS-L@LISTSERV.UGA.EDU
Date: Tuesday, August 12, 2008, 4:56 PM
Hi,
I'm not sure what editor you are using
but the space character after the DEATH_YEAR
has the highbit set and thus is a hex A0
space character rather than a hex 20 space.
Retyping the lines with this eliminates
your errors. (i.e. or deleting the A0 space)
data old;
death_place = 'aaa';
place_death = 'aaa';
death_year = 'bbb';
death_month = 'aaa';
run;
data new;
set old;
rename death_place = death_place05;
rename place_death = place_death05;
rename death_year = death_year05;
rename death_month = death_month05;
run;
Hope this is helpful.
Mark Terjeson
Senior Programmer Analyst
Investment Management & Research
Russell Investments
Russell Investments
Global Leaders in Multi-Manager Investing
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Irin later
Sent: Tuesday, August 12, 2008 1:34 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Failure to rename certain fields
I run the following code trying to rename all fields:
data new;
set old;
rename death_place = death_place05;
rename place_death = place_death05;
rename death_year = death_year05;
rename death_month = death_month05;
run;
However it appeared that just death_year & death month were renamed
properly.
Death_place and place_death stayed as they were before ...
Proc contents gave me the following:
# Variable Type Len Format Informat Label
18 DEATH_MONTH Char 2
17 DEATH_YEAR Char 4
15 death_place Char 3 $3. $3. death_place
16 place_death Char 1 $1. $1. place_death
I wonder how I can rename those two fields?
Thank you in advance,
Irin
|