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 (March 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 3 Mar 2009 10:00:12 -0600
Reply-To:   Catima Potter <cpotter@KUMC.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Catima Potter <cpotter@KUMC.EDU>
Subject:   rename select variables by removing prefix
Content-Type:   text/plain; charset=US-ASCII

Hello,

I have a large dataset where there are numerous variables with the prefix HospYQ (ie: HospYQelite, HospYQhawaii, HospYQsize). Not all of the variables have this prefix. I would like to rename the variables so they do not have the pre-fix (ie:, elite, hawaii, size).

While I could do a numerous rename statements, I would like for the code to be more efficient and easier to update since the variables with HospYQ prefix may not be the same each quarter when the data is pulled. For example, when the data is pulled in the spring, hospyelite is in the dataset however, when the data is pulled in the fall, hospyqelite is not there.

Thank you for your assistance. Catima


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