TMF Application Programmer's Guide (G06.24+)
TMF ARLIB2 Audit-Reading Procedures
HP NonStop TMF Application Programmer’s Guide—522419-004
5-11
Reading a Merged Audit Trail Without a MERGE
Cursor
Reading a Merged Audit Trail Without a
MERGE Cursor
The procedure for reading the MAT and all configured auxiliary audit trails as a merged
audit trail without using a MERGE cursor is as follows:
1. Open cursors for the MAT and all configured auxiliary audit trails by calling
AROPEN.
Within each call, use a fully qualified file name or the appropriate audit-trail ID
(MAT, AUX01, AUX02, ...) as the generic-name. When using the fully qualified
file name, the volume name is meaningless because ARLIB2 consults the TMP to
determine the location of the audit trail, the subvolume name must be ZTMFAT,
and the filename should be the appropriate two-character identifier (AA, BB, CC,
...).
Within the AROPEN call for the MAT, use the desired starting audit-file sequence
number as the min-seqno parameter value and the desired ending audit-file
sequence number or 999999 as the max-seqno parameter value. Within the
AROPEN call for each configured auxiliary audit trail, use 1 as the min-seqno
parameter value and 999999 as the max-seqno parameter value to achieve the
easiest implementation.
ARLIB2 correctly processes multiple active-audit volumes, overflow-audit volumes,
and restore-audit volumes. If audit restore is necessary and enabled, the TMP
uses the TMF dump/restore capability to restore audit-trail files to one of the
configured restore-audit volumes.
2. Using the MAT cursor, call ARREAD.
If any record other than an AuxPointer record is returned, process the record and
call ARREAD again.
If an AuxPointer record is returned, then do as follows for each configured auxiliary
audit trail:
a. Call ARFETCHAUXPOINTER.
b. Call ARPOSITION2 using the position information returned by the
ARFETCHAUXPOINTER call. The ARPOSITION2 call provides the starting
and ending positions within the auxiliary audit trail for the records to be merged
before the next MAT record.
c. Call ARREAD until ARE-END-OF-AUDIT is returned. At that point call
ARREAD for the MAT again.
If max-seqno in the AROPEN call was 999999 and ARE-END-OF-AUDIT is
returned for the MAT, you have read to the end of the merged audit trail. To
retrieve newly added audit records, pause briefly and then issue another ARREAD.