BookmarkSubscribeRSS Feed
Sasuser52
Fluorite | Level 6

Dear SAS-Community,

 

is there a way to add a variables to a data set and preserve the audit trail?

 

data test;

    set test;

    new = 0;

run;

==> variable 'new' is added, but audit trail is lost

 

data test;

    modify test;

    new = 0;

run;

==> audit trail is preserved, but variable 'new' is lost

 

Thank you!

2 REPLIES 2
ballardw
Super User

What do you think the purpose of an audit trail is?

Cheating on something in this fashion for one data set would make me extremely suspicious of any data in your shop, especially if formal audits are ever done.

 

I suggest going back in process so that the next time this is needed the variable is created at the same time the original test data set is.

Sasuser52
Fluorite | Level 6

Thank you for your answer 😊. I can assure you that I do not have the intention to cheat nor are any authorities involved. The audit trail can record the addition of a variable. In my case this is not necessary. For me it would be ok to suspend the audit trail, add the variable and afterwards resume the recording.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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