TMF Application Programmer's Guide (G06.26+)
TMF ARLIB2 Audit-Reading Procedures
HP NonStop TMF Application Programmer’s Guide—522419-005
5-4
Cursor Positioning
Cursor Positioning
You declare the location and direction of a cursor by using the ARPOSITION
procedure. Each ARPOSITION call supplies the cursor number, the sequence number
of the audit-trail file, an initial byte offset into the file, and the direction in which the
cursor is to move for successive reads. If the supplied offset is not at the beginning of
a record recognized by the audit-reading interface, then the first recognized record in
the current cursor direction is retrieved. Attempts to position the cursor beyond the
end-of-file (EOF) of an audit-trail file cause an error return.
The cursor position changes dynamically. Each read for a particular cursor causes the
position of that cursor to be advanced to the next recognized record. When a cursor
crosses from one audit-trail file to another, the new file is automatically opened and the
cursor’s sequence number and RBA are updated accordingly.
Restoring Audit-Trail Files From Audit Dumps
When you declare a cursor, you can indicate whether or not audit-trail files that are not
on disk should be restored from audit dumps. When you are reading from a cursor that
is positioned at a missing audit-trail file, a request is sent to the TMP process to restore
the file from the appropriate audit dump; this is true whether you do an explicit
positioning to a missing file, or successive reads cause the cursor to cross over into a
missing file.
Missing files are restored to an audit-restore volume, a disk on the local system used
to store audit-trail files that are restored from an audit dump as part of the recovery
procedure. This minimizes the impact of file restoration on normal transaction
processing.
You can also elect to have successive audit-trail files restored ahead of time. When
you do that and the next audit-trail file in the current cursor direction is missing, the
missing file is restored automatically: this saves time when reading sequentially
through several audit files.
You specify the desired audit-trail file restoration information by using the TMFCOM
ADD AUDITTRAIL and ALTER AUDITTRAIL commands. Tape mount requests, if
necessary, are handled by the labeled tape subsystem.
When unable to restore a requested file, the TMP returns an error indication.
To use this feature:
•
You must be reading audit-trail files that were generated on the local system.
•
The associated audit dumps must be included in the TMF catalog.
•
TMF must be running.