Dear SAS-Community,
is there a way to sort a data set and preserve the audit trail?
Proc Sort replaces the data set and does not preserve the audit trail.
Thank you!
I do not think there is. But you could try putting an index on the table instead, e.g.:
/* This does not work. Audit trail will be dropped:
proc sort data=audited;
by ID Date;
run;
*/
proc sql;
create index idx on audited(ID,Date);
quit;
You should then be able to read the data set BY ID DATE. It may run more slowly, but if the table is not too big, that should not be a problem.
PS: Not tested, just a suggestion to try.
Thank you for your answer 🍓. Your answer might help somebody, but for me this is not what I am looking for.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.