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 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 26 Jun 2002 09:26:03 -0400
Reply-To:   "Fehd, Ronald J." <rjf2@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Fehd, Ronald J." <rjf2@CDC.GOV>
Subject:   Re: variable array dimension declaration
Comments:   cc: Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>
Content-Type:   text/plain

> From: Jim Groeneveld [mailto:J.Groeneveld@ITGROUPS.COM] > I want to define a new ARRAY (with not yet existing elements) > of which the > dimension is given as the value of a variable in the same > data step. Is that > possible and if so, how? E.g. something like (but the example > is wrong, it > would indicate the implicit index variable): > ARRAY ArrName (dim); > I know how to do it in two data steps using a macro variable.

What reason(s) do you have for not wanting to use that solution?

> The known > dimension is the dimension of another, existing array, the > result of the DIM function.

is this what you want: data x; array Known(*) <var list>; array New(dim(Known));

Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov

e-mail your SAS improvements to: suggest@sas.com

If you always try to be logical, you probably won't ever have much sorrow, or much fun. -- Ashleigh Brilliant pot-shot #4438


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