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 (May 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 8 May 2006 01:40:32 -0700
Reply-To:   Eash <easwara@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Eash <easwara@GMAIL.COM>
Organization:   http://groups.google.com
Subject:   assign single value to broken series of variables
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset="iso-8859-1"

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; CCARD22=-99; CCARD34=-99; CCARD44=-99; CCARD55=-99; .. .. .. End;

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 ?

thanks Easwara


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