LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (October 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 21 Oct 2009 10:06:41 -0500
Reply-To:     "Data _null_;" <iebupdte@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Data _null_;" <iebupdte@GMAIL.COM>
Subject:      Re: Usage of sum function
Comments: To: Chris Jones <chrisj75@gmail.com>
In-Reply-To:  <476575b2-dbfe-4124-8306-14f0efec583d@o36g2000vbl.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1

On 10/21/09, Chris Jones <chrisj75@gmail.com> wrote: > Using the colon operator would use ANY variable beginning with X, > resulting in errors if you had, for example, a character variable > called "x_something". > > Alternatives: > > xsum = sum(of x1-x50); > > or > > array xx{*} x1-x50; > xsum = sum(of xx{*});

I believe the whole point of the question was "how to refer to the enumerated variable list" without knowing the dimension. If you had concern about name "collision" you could use the PROC TRANSPOSE option PREFIX to give the enumerated variable list a name prefix that would likely be more unique.


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