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: 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 16. 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
  • 378 views
  • 0 likes
  • 2 in conversation