Previous Topic Next topic Print topic


CBL_AUDIT_HANDLE_GET

Get an audit handle.
Restriction: This topic applies only when the Enterprise Server feature is enabled.

Syntax:

call "CBL_AUDIT_HANDLE_GET" using by value     flags
                                  by reference component-name
                                  by reference audit-handle
                                     returning status-code

Parameters:

  Typedef Picture
flags cblt-x4-comp5 pic x(4) comp-5
component-name pic x(n) pic x(n)
audit-handle cblt-x4-comp5 pic x(4) comp-5

On Entry:

flags
Bit Value Meaning
0-29   Reserved for future use (must be 0)
30 0 component-name is space-terminated
  1 component-name is null-terminated
    (ignored if bit 31 unset)
31   Reserved for future use (must be 0)
component-name
Space- or null-terminated (depending upon bit 30 setting) case-insensitive component identifier string.

On Exit:

audit-handle
Audit handle to be specified to the CBL_AUDIT_EVENT API.

Return Codes:

78-AUD-RET-SUCCESS
78-AUD-RET-NOT-ENOUGH-MEMORY
78-AUD-RET-INVALID-COMPONENT-NAME

Comments:

Components should invoke this API to acquire an audit handle before performing any auditing operations. This API returns an audit handle that should be passed to the CBL_AUDIT_EVENT API.

Please note that the CBL_AUDIT_EVENT API allows a component to be specified as a handle or as a string depending upon its flags parameter specification. This allows events to be output without first acquiring an audit handle by specifying a component identifier string instead. However, this will have an impact on performance as the component identifier will be validated each time.

Examples:

Acquire an audit handle to output "mycomp" audit events.

copy "mfaudit.cpy".

01 audit-handle    pic x(4) comp-5.
01 component-name  pic x(7) value "mycomp".
...
call "CBL_AUDIT_HANDLE_GET" using by value 0
                                  by reference component-name
                                  by reference audit-handle
...
Previous Topic Next topic Print topic