Close an audit file.
Restriction: This topic applies only when the Enterprise Server feature is enabled.
Syntax:
call "CBL_AUDIT_FILE_CLOSE" using by value flags
by value auditfile-handle
returning status-code
Parameters:
|
Typedef |
Picture |
flags |
cblt-x4-comp5 |
pic x(4) comp-5 |
auditfile-handle |
cblt-pointer |
pointer |
On Entry:
Control flags
Bit |
Value |
Meaning |
0 |
0 |
Close all files associated with the handle |
|
1 |
Close the current file associated with the handle (use when processing a file collection). |
1 |
0 |
Do not set 'dumped' flag |
|
1 |
Set 'dumped' flag |
2-31 |
|
Reserved for future use (must be 0) |
- auditfile-handle
- Audit handle returned by the CBL_AUDIT_FILE_OPEN API.
Return Codes:
78-AUD-RET-SUCCESS |
78-AUD-RET-INVALID-HANDLE |
78-AUD-RET-FILE-NOT-DUMPED |
Examples:
copy "mfaudit.cpy ".
01 auditfile-handle pic x(4) comp-5.
01 flags pic x(4) comp-5.
...
compute flags = 78-AUDITFILE-FLAG-CLOSE-CURRENT b-or
78-AUDITFILE-FLAG-CLOSE-DUMPED
call "CBL_AUDIT_FILE_CLOSE" using by value flags
by value auditfile-handle
...
Comments:
CBL_AUDIT_FILE_CLOSE() is used to close the audit file, or audit file collection, identified by the auditfile-handle parameter. The flags parameter can be used to control whether or not the file, or files if an audit file collection is associated with the handle, is marked as being 'dumped'. Once a file is marked as 'dumped', it can be reused by the audit event consolidator process.