Sorry, it looks like I did not understand your problem. So, the above code is only a part of the solution. Please submit a sample of your data then it will be easier to get into a solution. This is my second attempt:
[pre]
proc freq data=EX_BID noprint;
tables EXDT/out=freq (where=(Count < 2));
by USUBJID;
run;
data miss;
set freq;
miss=2-count;
run;
proc transpose data=miss out=M prefix=M;
var miss;
by USUBJID;
run;
proc transpose data=miss out=D prefix=D;
var EXDT;
by USUBJID;
run;
data tr;
merge d m;
by USUBJID;
run;
data r;
set tr;
array d d:;
array m m:;
if DIM(d) > 1 then do;
do i=2 to DIM(d);
if 2 <= SUM(d[i],-d[i-1]) then output;
else if 1 = SUM(d[i],-d[i-1]) then do;
if 4 <= 2+SUM(m[i],m[i-1]) then output;
end;
end;
end;
keep USUBJID D:;
run;
[/pre]
SPR