I have patient encounter file with more than 13000 records. File structure is like this. No Problemtype1 problemtype1b problemtype1c ... problemtype49 prblemtype49c outcome1 outcome1b ... outcome49c -------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 aa bb cc aa bb solved rejected denied 2 ... 13000 I need to count respective outcomes if problemtype is 'aa'. I am using following sample code. data test2; set testdata; array problemType [4,3] ProblemType1 - ProblemType8 ProblemType1b1-ProblemType1b4; array final_outcome {4,3} final_outcome1-final_outcome8 final_outcome1b1-final_outcome1b4; aa=0; Solved = 0; Denied=0; Rejected=0; do i= 1 to 4; do j=1 to 3; if ProblemType(i,j) = 'aa' then aa=aa+ 1; if ProblemType (i,j) = 'aa' then if final_outcome (i,j) = 'resolved' then Solved = Solved + 1 ; else if final_outcome (i,j) = Denied' then Denied=Denied+ 1; else if final_outcome (i,j) = 'Rejected' then Rejected=Rejected + 1; end; end; run; This sample code works fine. But When I specify the following code while using it on original file having 13000 records array problemType [13000,147] $; array final_outcome {13000,147) $ ; SAS goes into infinte loop. It does not produce any results. Please help me with this problem. I am new to SAS.
... View more