Hello everyone,
I am running into a problem when manipulating an enormous matrix with proc iml. I am on SAS 9.4 TS 1M1. My codes are as followed:
proc iml;
use dnet_new_1;
read all var{director_id connected_director_id yearb yeare} into x;
close dnet_new_1;
xrow=nrow(x);
z=shape({.},xrow,5);
z[,1:4]=x;
z[1,5]=1;
do i=2 to xrow;
if x[i,1]^=x[i-1,1] | x[i,2]^=x[i-1,2] then z[i,5]=1;
else if x[i,3]-x[i-1,4]<=1 then z[i,5]=z[i-1,5];
else z[i,5]=z[i-1,5]+1;
end;
create dnet_new2_1 from z;
append from z;
close dnet_new2_1;
quit;
The matrix has 59,248,496 rows and 5 columns. I've already used the MEMSIZE option to allocate all possible system memory. It reads the following after I run "proc options option=memsize value;":
Option Value Information For SAS Option MEMSIZE
Value: 33523975680
Scope: SAS Session
How option value set: SAS Session Startup Command Line
Nevertheless, I receive the following error message: "ERROR: (execution) Unable to allocate sufficient memory. At least 2147483647 more bytes required. ".
Any advice will be appreciated.