Controlling the Audit Trail

Overview

Once you activate an audit trail, you can suspend and resume logging, and terminate (delete) the audit trail by resubmitting a PROC DATASETS step with additional statements. You use the DATASETS procedure to suspend and then resume the audit trail. You also use this procedure to delete or terminate an audit trail.
General form, DATASETS procedure to suspend, resume, or terminate an audit trail:
PROC DATASETS LIB=libref<NOLIST>;
AUDIT SAS-data-set <SAS-password>;
SUSPEND | RESUME | TERMINATE;
QUIT;
Here is an explanation of the syntax:
libref
is the name of the library where the table to be audited resides.
NOLIST
suppresses the directory listing.
SAS-data-set
is the name of the SAS data set that you want to audit.
SAS-password
is the SAS data file password, if one exists.
SUSPEND
suspends event logging to the audit file, but does not delete the audit file.
RESUME
resumes event logging to the audit file, if it was suspended.
TERMINATE
terminates event logging and deletes the audit file.
Tip
Because each update to the data file is also written to the audit file, the audit trail can negatively affect system performance. You might want to consider suspending the audit trail for large, regularly scheduled batch updates.

Example

The following code terminates the audit trail on the data set Capinfo.
Note: If you choose to run this example, you must copy the data set Capinfo from the Sasuser library to the Work library.
proc datasets nolist;
   audit capinfo;
   terminate;
quit;
A message is written to the log when the audit trail is terminated.
Table 18.5 SAS Log
65   audit capinfo;
66   terminate;
NOTE: Deleting WORK.CAPINFO (memtype=AUDIT).
67 quit;
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.104.183