Date: Thu, 4 May 2006 18:18:26 -0700
Reply-To: Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject: Re: assign single value to broken series of variables
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 5/8/2006 1:40 AM Eash said the following:
> Hi All,
> based on a IF rule, Is it possible to assign a single value to a series
> of variables(broken)??
> for eg, I've variables CARD22,CARD34,CARD44,CARD55..etc(note that the
> variables are not continuous)
> and with the value of a variable X , i want to do the following!
> If X='BALANCE' Then do;
David Cassell must be out to lunch (a late lunch). I was expecting him
to chime in with "You don't want to do that!"
So why do you want to do that? This seems like a good use for SAS
missing values. Assuming that the CCARD variables ordinarily contain
meaningful numeric values, it's not a good idea to throw in values from
a different domain. Sooner or later someone will try to take a sum or
mean of those fields, and that's trouble.
> Of course, I have 50+ CCARD Variables and don't wanna do it with the
> help if assignment statements. Even if we go for a MACRO'y solution, I
> need to pass the 22,34,44,55 as parameters!!! is there any short cut
> (which surely i'm not aware)..to shorten my code ?