Обработка с сохраненным совокупным итогом и флагом вывода:
data want ;
set have ;
by ID ; /* assumes your data is sorted already by ID */
retain cumtot _out . ;
if first.ID then call missing(cumtot,_out) ;
cumtot + total ;
if cumtot >= 1000 and not _out then do ;
_out = 1 ; /* set flag so we don't output further records for this ID */
output ;
end ;
drop _: ;
run ;
Я бы также не стал называть набор данных "data".