@ken_oy: Hi can you have try on this. data gh; input a b c h l k p; datalines; 1 . 1 . 1 . 1 . . 1 . . . 1 . 1 . 1 1 . . ;run; data fg(drop = x mark i j); set gh; array f _numeric_; x=0; do i = 1 to dim(f); if f ^= . then x+1; end; if x > 1 then do; mark=0; do j = 1 to dim(f); if f ^= . then mark+1; if mark not in (. 0) and x - mark >= 1 and f = . then f = 1; end; end; run;
... View more