@Tyler_G wrote: "This only worked for the first set of dates." - and you are right.
@Kurt_Bremser gave the answer.
here is the fixed code:
data want;
set have;
retain flag 0;
if flag=1 then output;
if <condition> is true then flag=1; else flag=0; /* <<< line changed */
.... any other code with current row ...
run;
... View more