You can still PAUSE and ask the user to continue: PAUSE "Submit 'RESUME;' to continue"; That will flush the output buffer. However, I assumed the OP wanted a continuous monitor process that does not wait for human input.
... View more
use full code proc sort data=dsn; by id date; run; data dsn22; set dsn; by id date; if first.date then cnt=1; else cnt+1; if cnt <=2; drop cnt; run;
... View more