Guardian Programmer's Guide

Table Of Contents
Guardian Programmer’s Guide 421922-014
20 - 1
20
Interfacing With the ERROR
Program
The ERROR process returns error-message text associated with a file-system error
number. You can access the ERROR process in one of the following ways:
By typing the ERROR command and a file-system error number in response to the
command-interpreter prompt. The ERROR process responds by displaying the
error number and associated text on the terminal or designated OUT file.
Programmatically by sending the error-message number to the ERROR process in
an interprocess message.
For details on using the ERROR program with the TACL program, refer to the
Guardian User’s Guide. The remainder of this section discusses how to
programmatically interact with the ERROR process from your own application.
To obtain the message text for a file-system error number, your program must execute
the following sequence:
1. Start an ERROR process using the PROCESS_CREATE_ procedure.
2. Open the ERROR process.
3. Send a Startup message to the ERROR process using the WRITE procedure. In
this Startup message, you must specify $RECEIVE as the OUT file and the ASCII
code for the error number in the parameter string.
4. Read and process the error message. Use the WRITEREAD procedure for
reading message text.
5. Close and delete the ERROR process.
The following subsections describe each of the above operations in detail. The sample
program at the end of this section shows one way of writing an application to access
error-message text. Advanced readers may prefer to go straight to the sample
program.