Date: Fri, 21 Jun 2002 11:08:36 -0700
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "David L. Cassell" <Cassell.David@EPAMAIL.EPA.GOV>
Subject: Re: Using Variable Values in New Variables Names
Content-type: text/plain; charset=us-ascii
"Balint, Jess" <JBalint@ALLDATA.NET> wrote:
> I tried this:
> data test;
> x = 1;
> y&x = 2;
> But that doesn't work. Could somebody point me in the right direction
> I have values in a dataset that I am trying to transforms and don't
> like writing a page full of if statements. Thanks.
You'll need to give us more information here. You may want
more on macro variables, but the right solution might be data
step arrays. Or PROC TRANSPOSE. Or something else. But
what you wrote above is clearly not going to work by itself.
What it *should* look like is debatable without more data.
David Cassell, CSC
Senior computing specialist