data a;
input obs        x1 x2 x3 x4        x5 x6 x7 x8        x9;
cards;
1  0  0  0  0  0  1  1  0  1
2  0  1  1  1  0  0  1  1  0
3  1  0  0  1  1  1  1  0  0
4  1  1  1  0  0  1  1  1  0
5  0  1  1  0  0  0  1  1  1
;
data b;
set a;
n=0;        m=0;
array x(9) x1-x9;
do i=1 to 9;
if x(i)=1 then n=n+1;
if n>m then m=n;
if x(i)=0 then n=0;
 end;
 keep x1-x9 m;
proc print;
run;