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 (February 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 26 Feb 2003 08:11:05 -0500
Reply-To:   Don Henderson <donaldjhenderson@HOTMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Don Henderson <donaldjhenderson@HOTMAIL.COM>
Subject:   Re: Remove prefix after a proc transpose
Content-Type:   text/plain; charset="iso-8859-1"

Franz,

Instead of removing them after PROC TRANSPOSE puts them there, you might want to look at the values of the ID variable. I suspect that they are prefixed by some special character that SAS needs to map to an _ in order to make it a valid sas name. Consider the follow example that illustrates how sas handles such characters:

data before; input x $ y; x = '*'||x; /* add a special char to force the _ */ cards; a 1 b 2 c 3 proc transpose data=before out=tpose; id x; var y; run; data _null_; set tpose; put _all_; /*to show the names in the log */ run;

HTH, Don Henderson

----- Original Message ----- From: "Franz" <franz_cl2003@YAHOO.FR> Newsgroups: bit.listserv.sas-l To: <SAS-L@LISTSERV.UGA.EDU> Sent: Wednesday, February 26, 2003 6:23 AM Subject: Remove prefix after a proc transpose

> Dear all, > > in order to remove the prefix ( _ ) from > the variables name (after a proc transpose) > here is what I did: > > DATA two; > SET two; > RENAME _visit = visit > _week = week > _hr = hr > _pr = pr > > . > . > . > ; > RUN; > > Is there another elegant way to do this? > Many thanks, > Franz. > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Tax Center - forms, calculators, tips, more > http://taxes.yahoo.com/ >


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