Sounds to me that you'd be best off incorporating BOTH of @Reeza's suggestions (i.e., use the whichn function to find the first outcome of 1, then use its location to set all remaining outcomes to missing. e.g.:
data have;
input id outcome1-outcome14;
datalines;
1 3 2 1 1 1 1 4 5 1 1 1 1 1 1
2 3 2 3 3 3 4 1 5 2 2 2 2 2 2
3 2 2 2 2 2 2 2 2 2 2 2 2 2 1
4 2 2 2 2 2 2 2 2 2 2 2 2 2 2
;
data want (drop=start i);
set have;
array outcomes(*) outcome1-outcome14;
start=whichn(1,of outcomes(*));
if 1 le start lt dim(outcomes) then do i=start+1 to dim(outcomes);
call missing(outcomes(i));
end;
run;
Art, CEO, AnalystFinder.com
... View more