Date: Mon, 1 Sep 1997 19:50:52 PDT
Reply-To: TWB2%Rates%FAR@bangate.pge.com
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Tim Berryhill 3rd time <TWB2%Rates%FAR@BANGATE.PGE.COM>
Subject: Re: lower triangle
It looks to me as if the second marked line should be
VARS(J)=DAT(COUNT); rather than VARS(I)...
----------------------[Reply - Original Message]----------------------
Sent by:"A.A.Mcculloch" <aam22@CITY.AC.UK>
Hi,
I'm trying to produce a 32*32 lower triangular matrix from its 528
members read in as a single record. I store the data in array dat and have
2 nested loops to get the correct sequence in the matrix. The problem is
with the variable count that does not increment as I expected.
array dat(*) v1-v528 ;
array vars(*) var1-var32 ;
keep var1-var32 ;
count = 0 ;
do i = 1 to 32 ;
do j = 1 to i ;
******* count = count + 1 ; **********
******* vars(i) = dat(count) ; **********
end ;
output ;
end ;
run ;
proc print ; run ;
yours sincerely
Andrew McCulloch
=====================================================================