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 (June 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments:   To: Michael Wells <mwells@bcbsal.org>
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;

Like that.

[Jess]

-----Original Message----- From: Michael Wells [mailto:mwells@bcbsal.org] Sent: Friday, June 21, 2002 2:28 PM To: JBalint@ALLDATA.NET Subject: Re: Using Variable Values in New Variables Names

Is this whay you are attempting to do? data test; %let x = 1; y&x = 2; run;

>>> "Balint, Jess" <JBalint@ALLDATA.NET> 06/21/02 12:55PM >>> I tried this:

data test; x = 1; y&x = 2; run;

But that doesn't work. Could somebody point me in the right direction here? I have values in a dataset that I am trying to transforms and don't feel like writing a page full of if statements. Thanks.

[Jess]


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