LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (January 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 13 Jan 2006 16:13:56 +0000
Reply-To:   toby dunn <tobydunn@HOTMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   toby dunn <tobydunn@HOTMAIL.COM>
Subject:   Re: Rename/reference variables dynamically?
Comments:   To: pennwhip@YAHOO.COM
In-Reply-To:   <200601131549.k0DF8Mc7013783@mailgw.cc.uga.edu>
Content-Type:   text/plain; format=flowed

Penn,

I see you are using proc transpose..... In that case look up prefix= option in proc transpose.

AS to your second question we need to know more about the problem such as do you want to look at col1 = col2, col1 = col3 etc... col1 = colN, and do the same thing over again for col2 and col3 ... to colN?

Toby Dunn

From: Penn Whipple <pennwhip@YAHOO.COM> Reply-To: Penn Whipple <pennwhip@YAHOO.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: Rename/reference variables dynamically? Date: Fri, 13 Jan 2006 10:49:02 -0500

Hi All,

I have a data set where the transposed variables (mail dates) are called: col1 col2 col3.... along with a match key variable.

What I would like help with is how to rename the transposed variables from col1, col2, col3... to maildate1, maildate2, maildate3... dynamically.

I'd also like to be able to dynamically reference these variables (i.e. if col1 = col2 then do something) if possible.

Since the number of transposed variables will change every time the data is refreshed, it would be very nice to not have to hard code rename/if statements every time.

I'm guessing an array would be a start but I hardly ever use them, so I thought I'd ask the experts :)

Thanks in advance for the help.

Penn


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