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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 359 views
  • 0 likes
  • 2 in conversation