TMF Application Programmer's Guide (G06.24+)
TMF ARLIB2 Audit-Reading Procedures
HP NonStop TMF Application Programmer’s Guide—522419-004
5-6
Error Reporting
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, later in
this section.
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).
Procedural Retrieval of Message Text
When messages corresponding to error codes are printed on the operator terminal, the
error information is normally remembered by the associated cursor. The text of the
most recent message generated for a given cursor is available by calling the
ARPRINTMESSAGE or ARGETMESSAGELINE procedures.
ARPRINTMESSAGE copies the message text to a file whose filenumber is passed to
the procedure. ARGETMESSAGELINE allows you to retrieve lines of message text
into your application buffer. Both procedures return a warning if no error information is
currently recorded for the specified cursor.










