Audit Trail Variable
|
Information Stored
|
---|---|
_ATDATETIME_
|
date and time of a modification
|
_ATUSERID_
|
login user ID associated
with a modification
|
_ATOBSNO_
|
observation number affected
by the modification unless REUSE=YES
|
_ATRETURNCODE_
|
event return code
|
_ATMESSAGE_
|
SAS log message at the
time of the modification
|
_ATOPCODE_
|
code describing the
type of operation
|
_ATOPCODE_
|
Event
|
---|---|
DA
|
added data record image
|
DD
|
deleted data record
image
|
DR
|
before-update record
image
|
DW
|
after-update record
image
|
EA
|
observation add failed
|
ED
|
observation delete failed
|
EU
|
observation update failed
|
General form, LOG statement:
LOG <audit-settings>;
audit-settings
are any of the following:
|
proc datasets nolist; audit capinfo; initiate; log data_image=NO before_image=NO; quit;
General form, USER_VAR
statement:
USER_VAR variable-name <$><length><LABEL='variable-label'>;
variable-name
is the name of the
user variable that you are creating.
$
indicates the variable
is a character variable.
length
specifies the length
of the variable (the default is 8).
variable-label
specifies a label for
the variable enclosed in quotation marks.
|
proc datasets nolist; audit capinfo; initiate; user_var who $20 label = 'Who made the change' why $20 label = 'Why the change was made'; quit;