Date: Fri, 9 Apr 2004 13:08:49 -0500 aldi "SAS(r) Discussion" aldi Washington University in St. Louis ERROR: Array subscript out of range text/plain; charset=us-ascii; format=flowed

Hi, 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

I would appreciate any input. TIA, Aldi

Partial program: ================ do j=1 to &nphenos; put "step0 reached here " j= i= ;

if i>2 then do; grs{j,i} = .5*grs{j,1} + .5*grs{j,2} + sqrt(1 - (.5*(1+ugrfms{j})))*

rgs{j,i};

put "step1 " i= grs(j,1)= grs(j,2)= grs(j,i)= ugrfms(j)= rgs(j,i)= ;

end;

*-----------------------; * Finally, the phenotype; *-----------------------;

* OLD WAY; * ps{j,i} = hr{j}*grs{j,i} + hg{j,1}*ggs{1,i} + hg{j,2}*ggs{2,i} + hg{j,3}*ggs{3,i} + sqrt(1 - (hr{j}**2 + hg{j,1}**2 + hg{j,2}**2 + hg{j,3}**2))* prs{j,i}; * NEW Way; ps{j,i} = hr{j}*grs{j,i};

away = hr{j}**2;

put "step2" j= i= ps(j,i)= hr(j)= away= grs(j,i)= ;

do kk=1 to &nloci;

put "step3" j= i= kk= ps(j,i)= hg(j,kk)= ggs(kk,i)= ;

ps{j,i} = ps{j,i} + hg{j,kk}*ggs{kk,i}; away = away + hg{j,kk}**2;

put "step4" j= i= kk= ps(j,i)= hg(j,kk)= ggs(kk,i)= ;

end;

put "step5" j= i= ps(j,i)= away= prs(j,i)= ;

ps{j,i} = ps{j,i} + sqrt(1 - away)*prs{j,i};

put "step6" j= i= ps(j,i)= away= vps(j,i)= prs(j,i)= ;

ps{j,i} = ps{j,i}*sqrt(vps{j,i}) + ups{j,i};

put "step7" j= i= ps(j,i)= vps(j,2)= ups(j,i)=; put _all_ ; end;

Partial output: ================ step0 reached here j=3 i=1 step2j=3 i=1 P3_F=0.364037742 hr[3]=0.7071 away=0.49999041 GR3_F=0.5148320492 step3j=3 i=1 kk=1 P3_F=0.364037742 hg[3,1]=0 GG1_F=-1.732050808 step4j=3 i=1 kk=1 P3_F=0.364037742 hg[3,1]=0 GG1_F=-1.732050808 step5j=3 i=1 P3_F=0.364037742 away=0.49999041 PR3_F=-0.353823388 step6j=3 i=1 P3_F=0.1138444256 away=0.49999041 VP3_F=1 PR3_F=-0.353823388 step7j=3 i=1 P3_F=0.1138444256 VP3_F=1 UP3_F=0 eof=0 GR1_F=-0.134439214 PR1_F=1.3107530829 GR1_M=1.6265826224 PR1_M=-0.322236614 RG1_1=-0.534110438 PR1_1=-2.024393636 RG1_2=0.9166262711 PR1_2=0.1348701158 RG1_3=0.773014798 PR1_3=-0.047075114 RG1_4=0.137952519 PR1_4=-1.176261361 RG1_5=-0.416068656 PR1_5=-0.331200936 RG1_6=-0.534345067 PR1_6=-0.641530797 RG1_7=-0.739195464 PR1_7=1.6830554952 RG1_8=0.6042469274 PR1_8=1.3812377964 GR2_F=1.4766192743 PR2_F=-0.17018176 GR2_M=2.2334806783 PR2_M=-0.491079911 RG2_1=0.7290746547 PR2_1=1.2672406522 RG2_2=-0.727776069 PR2_2=0.6835733255 RG2_3=1.0641096429 PR2_3=1.0228156187 RG2_4=-1.074871942 PR2_4=0.2501367268 RG2_5=-0.43820783 PR2_5=-1.279301506 RG2_6=-0.263798673 PR2_6=0.5011167575 RG2_7=1.5585252565 PR2_7=0.1870635759 RG2_8=-0.901573934 PR2_8=-0.868029522 GR3_F=0.5148320492 PR3_F=-0.353823388 GR3_M=0.8825326384 PR3_M=-1.358671456 RG3_1=0.0644898814 PR3_1=0.4806781106 RG3_2=-1.194888583 PR3_2=-0.046086917 RG3_3=0.5077940659 PR3_3=-0.410100807 RG3_4=-0.781839132 PR3_4=0.9199787714 RG3_5=-0.925653323 PR3_5=0.321978375 RG3_6=1.0937135511 PR3_6=-0.71851705 RG3_7=0.9381550353 PR3_7=-0.520210347 RG3_8=-0.500944566 PR3_8=-0.046845285 GG1_F=-1.732050808 GG1_M=-0.614608742 4656 The SAS System 13:00 Friday, April 9, 2004

rep=1 ifamsgen=1 seed=1818813374 libname=OUT1 modeldsn=CACMOD modelnam=CAC1 MAF1_F=3 MAF1_M=. MAF1_1=. MAF1_2=. MAF1_3=. MAF1_4=. MAF1_5=. MAF1_6=. MAF1_7=. MAF1_8=. MAM1_F=9 MAM1_M=. MAM1_1=. MAM1_2=. MAM1_3=. MAM1_4=. MAM1_5=. MAM1_6=. MAM1_7=. MAM1_8=. DAF1_F=1 DAF1_M=. DAF1_1=. DAF1_2=. DAF1_3=. DAF1_4=. DAF1_5=. DAF1_6=. DAF1_7=. DAF1_8=. DAM1_F=1 DAM1_M=. DAM1_1=. DAM1_2=. DAM1_3=. DAM1_4=. DAM1_5=. DAM1_6=. DAM1_7=. DAM1_8=. AFF1_F=. AFF1_M=. AFF1_1=. AFF1_2=. AFF1_3=. AFF1_4=. AFF1_5=. AFF1_6=. AFF1_7=. AFF1_8=. GR1_1=. GR1_2=. GR1_3=. GR1_4=. GR1_5=. GR1_6=. GR1_7=. GR1_8=. GR2_1=. GR2_2=. GR2_3=. GR2_4=. GR2_5=. GR2_6=. GR2_7=. GR2_8=. GR3_1=. GR3_2=. GR3_3=. GR3_4=. GR3_5=. GR3_6=. GR3_7=. GR3_8=. P1_F=-0.006402618 P1_M=. P1_1=. P1_2=. P1_3=. P1_4=. P1_5=. P1_6=. P1_7=. P1_8=. P2_F=0.0824070277 P2_M=. P2_1=. P2_2=. P2_3=. P2_4=. P2_5=. P2_6=. P2_7=. P2_8=. P3_F=0.1138444256 P3_M=. P3_1=. P3_2=. P3_3=. P3_4=. P3_5=. P3_6=. P3_7=. P3_8=. RG1_F=. RG1_M=. RG2_F=. RG2_M=. RG3_F=. RG3_M=. MGG1_F=3/9 MGG1_M= MGG1_1= MGG1_2= MGG1_3= MGG1_4= MGG1_5= MGG1_6= MGG1_7= MGG1_8= GG1_1=. GG1_2=. GG1_3=. GG1_4=. GG1_5=. GG1_6=. GG1_7=. GG1_8=. UP1_F=0 UP1_M=0 UP1_1=0 UP1_2=0 UP1_3=0 UP1_4=0 UP1_5=0 UP1_6=0 UP1_7=0 UP1_8=0 UP2_F=0 UP2_M=0 UP2_1=0 UP2_2=0 UP2_3=0 UP2_4=0 UP2_5=0 UP2_6=0 UP2_7=0 UP2_8=0 UP3_F=0 UP3_M=0 UP3_1=0 UP3_2=0 UP3_3=0 UP3_4=0 UP3_5=0 UP3_6=0 UP3_7=0 UP3_8=0 VP1_F=1 VP1_M=1 VP1_1=1 VP1_2=1 VP1_3=1 VP1_4=1 VP1_5=1 VP1_6=1 VP1_7=1 VP1_8=1 VP2_F=1 VP2_M=1 VP2_1=1 VP2_2=1 VP2_3=1 VP2_4=1 VP2_5=1 VP2_6=1 VP2_7=1 VP2_8=1 VP3_F=1 VP3_M=1 VP3_1=1 VP3_2=1 VP3_3=1 VP3_4=1 VP3_5=1 VP3_6=1 VP3_7=1 VP3_8=1 DELIF=. DELIM=. DELI1=. DELI2=. DELI3=. DELI4=. DELI5=. DELI6=. DELI7=. DELI8=. MISSIF=0 MISSIM=0 MISSI1=0 MISSI2=0 MISSI3=0 MISSI4=0 MISSI5=0 MISSI6=0 MISSI7=0 MISSI8=0 MISSP1_F=. MISSP1_M=. MISSP1_1=. MISSP1_2=. MISSP1_3=. MISSP1_4=. MISSP1_5=. MISSP1_6=. MISSP1_7=. MISSP1_8=. MISSP2_F=. MISSP2_M=. MISSP2_1=. MISSP2_2=. MISSP2_3=. MISSP2_4=. MISSP2_5=. MISSP2_6=. MISSP2_7=. MISSP2_8=. MISSP3_F=. MISSP3_M=. MISSP3_1=. MISSP3_2=. MISSP3_3=. MISSP3_4=. MISSP3_5=. MISSP3_6=. MISSP3_7=. MISSP3_8=. DELP1_F=. DELP1_M=. DELP1_1=. DELP1_2=. DELP1_3=. DELP1_4=. DELP1_5=. DELP1_6=. DELP1_7=. DELP1_8=. DELP2_F=. DELP2_M=. DELP2_1=. DELP2_2=. DELP2_3=. DELP2_4=. DELP2_5=. DELP2_6=. DELP2_7=. DELP2_8=. DELP3_F=. DELP3_M=. DELP3_1=. DELP3_2=. DELP3_3=. DELP3_4=. DELP3_5=. DELP3_6=. DELP3_7=. DELP3_8=. NOUT1_F=. NOUT1_M=. NOUT1_1=. NOUT1_2=. NOUT1_3=. NOUT1_4=. NOUT1_5=. NOUT1_6=. NOUT1_7=. NOUT1_8=. NOUT2_F=. NOUT2_M=. NOUT2_1=. NOUT2_2=. NOUT2_3=. NOUT2_4=. NOUT2_5=. NOUT2_6=. NOUT2_7=. NOUT2_8=. NOUT3_F=. NOUT3_M=. NOUT3_1=. NOUT3_2=. NOUT3_3=. NOUT3_4=. NOUT3_5=. NOUT3_6=. NOUT3_7=. NOUT3_8=. UOUT1_F=. UOUT1_M=. UOUT1_1=. UOUT1_2=. UOUT1_3=. UOUT1_4=. UOUT1_5=. UOUT1_6=. UOUT1_7=. UOUT1_8=. UOUT2_F=. UOUT2_M=. UOUT2_1=. UOUT2_2=. UOUT2_3=. UOUT2_4=. UOUT2_5=. UOUT2_6=. UOUT2_7=. UOUT2_8=. UOUT3_F=. UOUT3_M=. UOUT3_1=. UOUT3_2=. UOUT3_3=. UOUT3_4=. UOUT3_5=. UOUT3_6=. UOUT3_7=. UOUT3_8=. VOUT1_F=. VOUT1_M=. VOUT1_1=. VOUT1_2=. VOUT1_3=. VOUT1_4=. VOUT1_5=. VOUT1_6=. VOUT1_7=. VOUT1_8=. VOUT2_F=. VOUT2_M=. VOUT2_1=. VOUT2_2=. VOUT2_3=. VOUT2_4=. VOUT2_5=. VOUT2_6=. VOUT2_7=. VOUT2_8=. VOUT3_F=. VOUT3_M=. VOUT3_1=. VOUT3_2=. VOUT3_3=. VOUT3_4=. VOUT3_5=. VOUT3_6=. VOUT3_7=. VOUT3_8=. XOUT1_F=. XOUT1_M=. XOUT1_1=. XOUT1_2=. XOUT1_3=. XOUT1_4=. XOUT1_5=. XOUT1_6=. XOUT1_7=. XOUT1_8=. XOUT2_F=. XOUT2_M=. XOUT2_1=. XOUT2_2=. XOUT2_3=. XOUT2_4=. XOUT2_5=. XOUT2_6=. XOUT2_7=. XOUT2_8=. XOUT3_F=. XOUT3_M=. XOUT3_1=. XOUT3_2=. XOUT3_3=. XOUT3_4=. XOUT3_5=. XOUT3_6=. XOUT3_7=. XOUT3_8=. AA1=1.1547005384 AB1=-0.288675135 BB1=-1.732050808 zptwo1=-0.994457883 zqtwo1=0.3584587933 theta1=0.5 uggfm1=0 ugrfm1=0 ugrfm2=0 ugrfm3=0 uprfm1=0 uprfm2=0 uprfm3=0 selfgr1=0 selfgr2=0 selfgr3=0 selfpr1=0 selfpr2=0 selfpr3=0 affpct1=0.95 affpct2=0.95 affpct3=0.95 affcut1=-1.644853627 affcut2=-1.644853627 affcut3=-1.644853627 ptransp1=1 ptransp2=1 ptransp3=1 ptransr1=6 ptransr2=6 ptransr3=6 j=3 i=1 x=9 recomb=. away=0.49999041 kk=2 nfamgen=. select=. nfamsel=0 nfamused=0 ifamssel=. _ERROR_=0 _N_=1 ERROR: Array subscript out of range at line 6694 column 206. ERROR: Array subscript out of range at line 6694 column 206. ERROR: Array subscript out of range at line 6694 column 206. eof=0 GR1_F=-0.134439214 PR1_F=1.3107530829 GR1_M=1.6265826224 PR1_M=-0.322236614 RG1_1=-0.534110438 PR1_1=-2.024393636 RG1_2=0.9166262711 PR1_2=0.1348701158 RG1_3=0.773014798 PR1_3=-0.047075114 RG1_4=0.137952519 PR1_4=-1.176261361 RG1_5=-0.416068656 PR1_5=-0.331200936 RG1_6=-0.534345067 PR1_6=-0.641530797 RG1_7=-0.739195464 PR1_7=1.6830554952 RG1_8=0.6042469274 PR1_8=1.3812377964 GR2_F=1.4766192743 PR2_F=-0.17018176 GR2_M=2.2334806783 PR2_M=-0.491079911 RG2_1=0.7290746547 PR2_1=1.2672406522 RG2_2=-0.727776069 PR2_2=0.6835733255 RG2_3=1.0641096429 PR2_3=1.0228156187 RG2_4=-1.074871942 PR2_4=0.2501367268 RG2_5=-0.43820783 PR2_5=-1.279301506 RG2_6=-0.263798673 PR2_6=0.5011167575 RG2_7=1.5585252565 PR2_7=0.1870635759 RG2_8=-0.901573934 PR2_8=-0.868029522 GR3_F=0.5148320492 PR3_F=-0.353823388 GR3_M=0.8825326384 PR3_M=-1.358671456 RG3_1=0.0644898814 PR3_1=0.4806781106 RG3_2=-1.194888583 PR3_2=-0.046086917 RG3_3=0.5077940659 PR3_3=-0.410100807 RG3_4=-0.781839132 PR3_4=0.9199787714 RG3_5=-0.925653323 PR3_5=0.321978375 RG3_6=1.0937135511 PR3_6=-0.71851705 RG3_7=0.9381550353 PR3_7=-0.520210347 RG3_8=-0.500944566 PR3_8=-0.046845285 GG1_F=-1.732050808 GG1_M=-0.614608742 rep=1 ifamsgen=1 seed=876760451 libname=OUT1 modeldsn=CACMOD modelnam=CAC1 MAF1_F=3 MAF1_M=. MAF1_1=. MAF1_2=. MAF1_3=. MAF1_4=. MAF1_5=. MAF1_6=. MAF1_7=. MAF1_8=. MAM1_F=9 MAM1_M=. MAM1_1=. MAM1_2=. MAM1_3=. MAM1_4=. MAM1_5=. MAM1_6=. MAM1_7=. MAM1_8=. DAF1_F=1 DAF1_M=. DAF1_1=. DAF1_2=. DAF1_3=. DAF1_4=. DAF1_5=. DAF1_6=. DAF1_7=. DAF1_8=. DAM1_F=1 DAM1_M=. DAM1_1=. DAM1_2=. DAM1_3=. DAM1_4=. DAM1_5=. DAM1_6=. DAM1_7=. DAM1_8=. AFF1_F=1 AFF1_M=. AFF1_1=. AFF1_2=. AFF1_3=. AFF1_4=. AFF1_5=. AFF1_6=. AFF1_7=. AFF1_8=. GR1_1=. GR1_2=. GR1_3=. GR1_4=. GR1_5=. GR1_6=. GR1_7=. GR1_8=. GR2_1=. GR2_2=. GR2_3=. GR2_4=. GR2_5=. GR2_6=. GR2_7=. GR2_8=. GR3_1=. GR3_2=. GR3_3=. GR3_4=. GR3_5=. GR3_6=. GR3_7=. GR3_8=. P1_F=-0.006402618 P1_M=. P1_1=. P1_2=. P1_3=. P1_4=. P1_5=. P1_6=. P1_7=. P1_8=. P2_F=0.0824070277 P2_M=. P2_1=. P2_2=. P2_3=. P2_4=. P2_5=. P2_6=. P2_7=. P2_8=. P3_F=0.1138444256 P3_M=. P3_1=. P3_2=. P3_3=. P3_4=. P3_5=. P3_6=. P3_7=. P3_8=. RG1_F=. RG1_M=. RG2_F=. RG2_M=. RG3_F=. RG3_M=. MGG1_F=3/9 MGG1_M= MGG1_1= MGG1_2= MGG1_3= MGG1_4= MGG1_5= MGG1_6= MGG1_7= MGG1_8= GG1_1=. GG1_2=. GG1_3=. GG1_4=. GG1_5=. GG1_6=. GG1_7=. GG1_8=. UP1_F=0 UP1_M=0 UP1_1=0 UP1_2=0 UP1_3=0 UP1_4=0 UP1_5=0 UP1_6=0 UP1_7=0 UP1_8=0 UP2_F=0 UP2_M=0 UP2_1=0 UP2_2=0 UP2_3=0 UP2_4=0 UP2_5=0 UP2_6=0 UP2_7=0 UP2_8=0 UP3_F=0 UP3_M=0 UP3_1=0 UP3_2=0 UP3_3=0 UP3_4=0 UP3_5=0 UP3_6=0 UP3_7=0 UP3_8=0 VP1_F=1 VP1_M=1 VP1_1=1 VP1_2=1 VP1_3=1 VP1_4=1 VP1_5=1 VP1_6=1 VP1_7=1 VP1_8=1 VP2_F=1 VP2_M=1 VP2_1=1 VP2_2=1 VP2_3=1 VP2_4=1 VP2_5=1 VP2_6=1 VP2_7=1 VP2_8=1 VP3_F=1 VP3_M=1 VP3_1=1 VP3_2=1 VP3_3=1 VP3_4=1 VP3_5=1 VP3_6=1 VP3_7=1 VP3_8=1 DELIF=0 DELIM=. DELI1=. DELI2=. DELI3=. DELI4=. DELI5=. DELI6=. DELI7=. DELI8=. MISSIF=0 MISSIM=0 MISSI1=0 MISSI2=0 MISSI3=0 MISSI4=0 MISSI5=0 MISSI6=0 MISSI7=0 MISSI8=0 MISSP1_F=. MISSP1_M=. MISSP1_1=. MISSP1_2=. MISSP1_3=. MISSP1_4=. MISSP1_5=. MISSP1_6=. MISSP1_7=. MISSP1_8=. 4657 The SAS System 13:00 Friday, April 9, 2004

MISSP2_F=. MISSP2_M=. MISSP2_1=. MISSP2_2=. MISSP2_3=. MISSP2_4=. MISSP2_5=. MISSP2_6=. MISSP2_7=. MISSP2_8=. MISSP3_F=. MISSP3_M=. MISSP3_1=. MISSP3_2=. MISSP3_3=. MISSP3_4=. MISSP3_5=. MISSP3_6=. MISSP3_7=. MISSP3_8=. DELP1_F=0 DELP1_M=. DELP1_1=. DELP1_2=. DELP1_3=. DELP1_4=. DELP1_5=. DELP1_6=. DELP1_7=. DELP1_8=. DELP2_F=0 DELP2_M=. DELP2_1=. DELP2_2=. DELP2_3=. DELP2_4=. DELP2_5=. DELP2_6=. DELP2_7=. DELP2_8=. DELP3_F=0 DELP3_M=. DELP3_1=. DELP3_2=. DELP3_3=. DELP3_4=. DELP3_5=. DELP3_6=. DELP3_7=. DELP3_8=. NOUT1_F=. NOUT1_M=. NOUT1_1=. NOUT1_2=. NOUT1_3=. NOUT1_4=. NOUT1_5=. NOUT1_6=. NOUT1_7=. NOUT1_8=. NOUT2_F=. NOUT2_M=. NOUT2_1=. NOUT2_2=. NOUT2_3=. NOUT2_4=. NOUT2_5=. NOUT2_6=. NOUT2_7=. NOUT2_8=. NOUT3_F=. NOUT3_M=. NOUT3_1=. NOUT3_2=. NOUT3_3=. NOUT3_4=. NOUT3_5=. NOUT3_6=. NOUT3_7=. NOUT3_8=. UOUT1_F=. UOUT1_M=. UOUT1_1=. UOUT1_2=. UOUT1_3=. UOUT1_4=. UOUT1_5=. UOUT1_6=. UOUT1_7=. UOUT1_8=. UOUT2_F=. UOUT2_M=. UOUT2_1=. UOUT2_2=. UOUT2_3=. UOUT2_4=. UOUT2_5=. UOUT2_6=. UOUT2_7=. UOUT2_8=. UOUT3_F=. UOUT3_M=. UOUT3_1=. UOUT3_2=. UOUT3_3=. UOUT3_4=. UOUT3_5=. UOUT3_6=. UOUT3_7=. UOUT3_8=. VOUT1_F=. VOUT1_M=. VOUT1_1=. VOUT1_2=. VOUT1_3=. VOUT1_4=. VOUT1_5=. VOUT1_6=. VOUT1_7=. VOUT1_8=. VOUT2_F=. VOUT2_M=. VOUT2_1=. VOUT2_2=. VOUT2_3=. VOUT2_4=. VOUT2_5=. VOUT2_6=. VOUT2_7=. VOUT2_8=. VOUT3_F=. VOUT3_M=. VOUT3_1=. VOUT3_2=. VOUT3_3=. VOUT3_4=. VOUT3_5=. VOUT3_6=. VOUT3_7=. VOUT3_8=. XOUT1_F=. XOUT1_M=. XOUT1_1=. XOUT1_2=. XOUT1_3=. XOUT1_4=. XOUT1_5=. XOUT1_6=. XOUT1_7=. XOUT1_8=. XOUT2_F=. XOUT2_M=. XOUT2_1=. XOUT2_2=. XOUT2_3=. XOUT2_4=. XOUT2_5=. XOUT2_6=. XOUT2_7=. XOUT2_8=. XOUT3_F=. XOUT3_M=. XOUT3_1=. XOUT3_2=. XOUT3_3=. XOUT3_4=. XOUT3_5=. XOUT3_6=. XOUT3_7=. XOUT3_8=. AA1=1.1547005384 AB1=-0.288675135 BB1=-1.732050808 zptwo1=-0.994457883 zqtwo1=0.3584587933 theta1=0.5 uggfm1=0 ugrfm1=0 ugrfm2=0 ugrfm3=0 uprfm1=0 uprfm2=0 uprfm3=0 selfgr1=0 selfgr2=0 selfgr3=0 selfpr1=0 selfpr2=0 selfpr3=0 affpct1=0.95 affpct2=0.95 affpct3=0.95 affcut1=-1.644853627 affcut2=-1.644853627 affcut3=-1.644853627 ptransp1=1 ptransp2=1 ptransp3=1 ptransr1=6 ptransr2=6 ptransr3=6 j=2 i=1 x=0.4082734005 recomb=. away=0.49999041 kk=2 nfamgen=. select=. nfamsel=0 nfamused=0 ifamssel=. _ERROR_=1 _N_=1

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