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
Here follow two examples of declaring the arrays in advance because you
%do j=1 %to &nphenos;
RG&j._F RG&j._M RG&j._1-RG&j._&maxkids
%do k=1 %to &nloci;
GG&k._F GG&k._M GG&k._1-GG&k._&maxkids
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
> array ABC (&nphenos) ...?
> array DEF (&nloci) ...?
> 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