LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 13 Aug 2008 06:27:06 -0700
Reply-To:   irinfigvam@yahoo.com
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Irin later <irinfigvam@YAHOO.COM>
Subject:   Re: Failure to rename certain fields
Comments:   To: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
In-Reply-To:   <16FD64291482A34F995D2AF14A5C932C044F526F@MAIL002.prod.ds.russell.com>
Content-Type:   text/plain; charset=iso-8859-1

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


Back to: Top of message | Previous page | Main SAS-L page