Date: Mon, 8 May 2006 17:22:04 -0700
Reply-To: David L Cassell <davidlcassell@MSN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: David L Cassell <davidlcassell@MSN.COM>
Subject: Re: assign single value to broken series of variables
Content-Type: text/plain; format=flowed
On Mon, 8 May 2006 01:40:32 -0700, Eash <easwara@GMAIL.COM> wrote:
> >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;
> >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 ?
I would say that you DO NOT want to do this. Saving numeric data as
-99 went out with 1980's style COBOL. It's a bad idea, since the slightest
mistake on the part of other anlaysts will leave those -99's in thre, and
the data analysis.
Use SAS missing values instead.
And, since you have nto explained what your CCARDxx vlaues are used for,
I have a suspicion that your database structure may also be a problem.
It certainly is enough of a problem that you are having to grapple with
additional features of SAS...
David L. Cassell
3115 NW Norwood Pl.
Corvallis OR 97330
Express yourself instantly with MSN Messenger! Download today - it's FREE!