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 (April 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 9 Apr 2004 13:42:23 -0500
Reply-To:     aldi <aldi@WUBIOS.WUSTL.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         aldi <aldi@WUBIOS.WUSTL.EDU>
Organization: Washington University in St. Louis
Subject:      Re: ERROR: Array subscript out of range
Content-Type: text/plain; charset=us-ascii; format=flowed

Hi Ron, Here follow two examples of declaring the arrays in advance because you asked: Thanks, Aldi array rgs{&nphenos,&maxmems} %do j=1 %to &nphenos; RG&j._F RG&j._M RG&j._1-RG&j._&maxkids %end; ;;;; array ggs{&nloci,&maxmems} %do k=1 %to &nloci; GG&k._F GG&k._M GG&k._1-GG&k._&maxkids %end; ;;;;

Fehd, Ronald J. PHPPO wrote: >>From: aldi [mailto:aldi@WUBIOS.WUSTL.EDU] >>Is there any special way to find out where the subscript in >>an array is reaching out of bound? How can I make SAS to tell >>me which array? > > >>I have a group of arrays and after I have checked all the >>loops I think the indices are set up correct. > > >>But still SAS is saying: >>ERROR: Array subscript out of range at line 6691 column 190 > > > well, that's what line numbers are for! > generally this error message means that you're still in the loop > and have gone past the upper bound. > > check the array reference in column 190 of line 6691 > > >> do j=1 to &nphenos; >> do kk=1 to &nloci; > > > you will have declared any of the following arrays > with the index J > as > array ABC (&nphenos) ...? > array DEF (&nloci) ...? > right? > > Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov > > remember perspective: the error is not always where it seems to occur! > -- RJF2


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