|Date: ||Fri, 21 Jun 2002 14:31:20 -0400|
|Reply-To: ||"Balint, Jess" <JBalint@ALLDATA.NET>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||"Balint, Jess" <JBalint@ALLDATA.NET>|
|Subject: ||Re: Using Variable Values in New Variables Names|
|Content-Type: ||text/plain; charset="iso-8859-1"|
No. I need to have the new variables based on the value of another variable
in the dataset.
if x = 1 then y1 = z;
if x = 2 then y2 = z;
if x = 3 then y3 = z;
From: Michael Wells [mailto:firstname.lastname@example.org]
Sent: Friday, June 21, 2002 2:28 PM
Subject: Re: Using Variable Values in New Variables Names
Is this whay you are attempting to do?
%let x = 1;
y&x = 2;
>>> "Balint, Jess" <JBalint@ALLDATA.NET> 06/21/02 12:55PM >>>
I tried this:
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.