AUDITFILE User Exit

The AUDITFILE emitter user exit is invoked to report on emitter status changes. It is enabled by specifying its name to the AUDITFILE emitter via the AuditfileExit property, see AUDITFILE Emitter Properties. The following status changes are reported:

The AUDITFILE emitter loads the DLL or shared object named by the AuditfileExit property and invokes the AUDITFILE_EMITTER_EXIT entry point within it whenever an emitter status change occurs.

The interface to the AUDITFILE_EMITTER_EXIT entry point is as follows:

Syntax:
typedef cobrtncode_t (*PFI_AUDITFILE_EMITTER_EXIT)(cobuns32_t function,
                                                   cobuns8_t *emitter_name,
                                                   ...);
On Entry:
function AUDITFILE emitter status change:
0 AUDITFILE emitter initialising. The exit may change the emitter's properties during its invocation
1 AUDITFILE emitter deinitialising. The exit would typically release any resources it has acquired during its previous invocations
2 A new audit file is being made active
3 The active audit file is now full
4 There are no audit files available for outputting events into
emitter name The name of the emitter invoking the exit
... A variable number of parameters depending on the value of function. When:
function=0 no additional parameters
function=1 no additional parameters
function=2 1 additional parameter: a null-terminated filename
function=3 1 additional parameter: a null-terminated filename
function=4 no additional parameters
On Exit:

Nothing

Return Codes:

Dependent upon the exit function. At present this should always be 0.

Comments:

Please note that the user exit should not be written in COBOL.

See auditfile_exit.c for an example.

Related topics: