TMF Application Programmer's Guide (H06.06+, J06.03+)
TMF ARLIB2 Audit-Reading Procedures
HP NonStop TMF Application Programmer’s Guide—540139-009
5-6
Error Reporting
How you go about retrieving the key or record address of a data record whose
modification is recorded in the audit trail depends upon the file type and the type of
audit record.
For key-sequenced files, the key of the record is present in the before-image and
after-image of the record. Because these images are not available for the UPDATE
AUDITCOMP record, the key is stored separately in the audit record and must be
fetched by using the ARFETCHRECORDKEY procedure. For an UPDATE
FIELDCOMP record, you use the ARFETCHFIELDVALUE procedure to retrieve
the before-image and after-image fields.
For entry-sequenced, relative, and unstructured files, you use the
ARGETRECADDR and ARGETRECADDR64 procedures to retrieve the record
address.
Error Reporting
The TMF audit-reading interface has two error reporting mechanisms: return codes
and messages printed to the operator terminal.
Return Codes
The first parameter of each procedure call, which is always required, is the name of a
variable to receive the return code. If that parameter is not passed to a procedure, the
procedure returns immediately without taking any action. The various types of return
codes have the following general meanings:
Zero indicates that the procedure completed successfully.
Negative numbers indicate that an error occurred.
Positive numbers indicate warnings: although the procedure was successful, some
unusual condition occurred. Warnings take the form of a bit map. This allows new
warnings to be easily added and multiple warnings to be returned simultaneously.
Applicable warning codes are described in the syntax definition of each individual
procedure call, later in this section; the error codes are described in Table 5-3
.
Messages Printed to the Operator Terminal
There are times when a simple error code is insufficient. Two examples are the
detection of a corrupt block in an audit file and the retry messages associated with
failed audit restore attempts.
In such cases, a message is printed on the operator terminal specified in the call to
ARSTART. If the problem causes the procedure to exit, an error code indicating the
general type of error is also returned to the calling program. Examples of this kind of
error are -800 (cursor error) and -900 (error reading the audit).










