|
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
|