If you need START and END years ,could try this too .
data have;
input id yr2010-yr2019;
datalines;
1 . . . . . . . . 1 1
2 1 1 1 . . . 1 1 1 1
3 1 1 1 1 1 . . . 1 1
4 . . . . . . 1 . . .
;
data want;
set have;
array x{*} yr: ;
temp=cats(of x{*});
pid=prxparse('/1+/');
s=1;e=length(temp);
call prxnext(pid,s,e,temp,p,l);
do while(p>0);
if maxYears<l then do;maxYears=l;start=vname(x{p}); end=vname(x{p+l-1}); end;
call prxnext(pid,s,e,temp,p,l);
end;
drop pid s e p l temp;
run;