I have no idea what your data step creating data set HAVE is doing. it looks like you are using a loop over three ids to create a one record where id=2 and var='' and the other records have var='A'. Totally meaningless example to me, and I can't understand what the rejected records are that you are discussing.
> Once more thanks a lot. ...and you definitly wrote
> this code on a Unix machine (no CR).
No windows the pre and /pre directives cause the loss of CR. I paste to WORD then copy to my editor, when I copy code from this forum.
> An audit trail on a SCD2 table with millions of
> records - scary!
Don't know what that is? You can limit the amount of output written to the AUDIT file.
[pre]log data_image=NO before_image=NO;[/pre]
You might try a different approcah using the MODIFY statement. Just send all rejected records to a BAD file. I don't know if it is possible to know which IC the record was rejected for as with AUDIT. Still might be adequate for your needs.
data want bad;
if 0 then modify want;
if _iorc_ ne 0 then output bad;