I liked @A_Kh's suggestion to sort by USUBJID descending ACTARM, which is intended to put missing ACTARM obs last within a USUBJID. But without a minor edit, it would not accommodate two distinct valid values for ACTARM (if a USUBJID had a valid "B" and a valid "C", the "B" would be deleted).
Consider this alternative, applied to data HAVE sorted by USUBJID (but not necessarily by ACTARM within USUBJID):
data want;
set have (where=(missing(actarm)=0) in=valid)
have (where=(missing(actarm)) in=miss);
by usubjid;
if lag(valid)=1 and first.usubjid=0 and miss=1 then delete;
run;
... View more