ballardw, yes, quite right: I always get the order of the first/last mixed up with the variable--too much object oriented programming--and indeed it does remove any that only have a singular observation. here is the corrected code: data myEdit; set test; by myID; if (first.myID or last.myID) then delete; run; And here is the code with that extra bit, it only strips the first and last, but it will also leave the observation that is a single for the id: data myJunk; set test; by myID; if (not (first.myID and last.myID)) and (first.myID or last.myID) then delete; run;
... View more