arrays in sas with different dimensions -


beginning table,

a b c d e  1 . 1 . 1 . . 1 . . . 1 . 1 . 

i trying output this:

a b c d e     x y z 1 . 1 . 1     1 1 1 . . 1 . .     1  . 1 . 1 .     1 1 

here code:

data want;  set have;   array gg(5) a-e;  array bb(3) x y z;  i=1 5; j=1 3;      if gg(i)=1 bb(j)=1;  end;  end;  run; 

i understand result wrong, dimensions of both arrays not co-operating. there way this?

data want;    set have;    array v1 a--e;    array v2 x y z;    i=1;    on v1;       if not missing(of v1) do;          v2(i)=v1;          i+1;       end;    end;    drop i; run; 

Comments