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 (October 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 21 Oct 2010 15:15:29 -0500
Reply-To:     Joe Matise <snoopy369@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Joe Matise <snoopy369@GMAIL.COM>
Subject:      Re: How to rename variable names containing invalid 
              sas characters ö and ä
Comments: To: Tom Cohen <cohen.tom78@gmail.com>
In-Reply-To:  <AANLkTi=mGq=UwGBBs=SmSvWg+Z3jygOSX1tT8ir+ShL0@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Tom,

I would look at A. What are the variables actually named? The odds are they are LABELED with the characters, and named either with the english equivalent, or with _ instead of the offending characters. Take a look and see! PROC CONTENTS, or just open the dataset and switch to viewing Names instead of Labels.

-Joe

On Thu, Oct 21, 2010 at 3:06 PM, Tom Cohen <cohen.tom78@gmail.com> wrote:

> Dear List, > > I got a sas dataset with variable names containing scandinavian characters > ö > ('o' with to dots) and 'ä' ('a' with two dots). > I tried to rename these variables to sas valid variables as following > > data b; > set data a; > rename sätt = satt; > run; > > but got an error message said sätt (containing 'a' with two dots) is > invalid sas name. > > I would like to rename all variables with invalid characters automatically > something like > if any variables containing either scandinavian 'ö' or 'ä' or 'ö and ä' > then > substitute these characters to 'o' and 'a'. > > Thanks alot for your help. > Best regards, > Tom >


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