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 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 14 Feb 2007 09:06:55 -0500
Reply-To:   "data _null_;" <datanull@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "data _null_;" <datanull@GMAIL.COM>
Subject:   Re: proc transpose
Comments:   To: mesecca L katram <mesecca@yahoo.com>
In-Reply-To:   <200702140553.l1E2qi0h007900@mailgw.cc.uga.edu>
Content-Type:   text/plain; charset=ISO-8859-1; format=flowed

Your PROC TRANSPOSE as written is creating DRAW2 as the variable NAME, instead of the default _NAME_.

I believe the problem is you are using PROC PRINT with the LABEL option to display data and that is confusing you. PROC CONTENTS will till you what is in your data.

proc transpose data = work.output2 out = work.Trans_output(Rename=(col1=draw)) name = draw2 ; run; proc contents varnum; run; proc print l; /*label option*/ run; proc print; run;

On 2/14/07, mesecca L katram <mesecca@yahoo.com> wrote: > the question was not completed > here is the data step I am using, > I need to change the name of the formaer viable in Proc Transpose > data output; > infile cards; > *input x1 y1 z1 c1 x2 y2 z2 c2 x3 y3 z3 c3; > input x1 y1 z1 x2 y2 z2 x3 y3 z3 ; > datalines; > 1 2 3 2 4 6 1 7 8 > 1 4 6 . . . 8 9 0 > . . . 2 3 4 5 6 7 > . . . 5 6 7 5 3 7 > ; > run; > > proc summary data=output; > var x1 x2 x3; > output out=output2 (drop=_type_ _freq_) > sum=; > run; > > > I need to change the name of the formaer viable in Proc Transpose > proc transpose data=output2 out=Trans_output (Rename=(col1=draw)) > name=draw2 > ; > run; > > Name of > Former Variable draw > x1 2 > x2 9 > x3 19 > > I need to change name of the former variable to a somesomething like DRAW1 > > as I need to create another column called pad > data new; > set Trans_output; > pad=substr(DRAW1,1,1); > run; > I have tried Name=, label= options nothing worked. > Thanks In Advance >


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