BookmarkSubscribeRSS Feed
Sasuser52
Fluorite | Level 6

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!

2 REPLIES 2
s_lassen
Meteorite | Level 14

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.

Sasuser52
Fluorite | Level 6

Thank you for your answer 🍓. Your answer might help somebody, but for me this is not what I am looking for.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 497 views
  • 0 likes
  • 2 in conversation