Guardian Programmer's Guide

Table Of Contents
Interfacing With the ERROR Program
Guardian Programmer’s Guide 421922-014
20 - 4
Sending an ERROR Process a Startup Message
Sending an ERROR Process a Startup
Message
After opening the ERROR process file, you must use the WRITE[X] procedure to send
the ERROR process a Startup message. This Startup message must contain the
following information:
-1 in the first word to identify the message as the Startup message.
The $RECEIVE file as the OUT file. Doing so causes the ERROR process to send
its output to your process (the process that opened it).
The error number in ASCII code in the parameter string. The ERROR process
expects to find the error number to process in the parameter string.
The Startup message sent to the ERROR process will therefore be similar to the
following:
Note that the default volume and subvolume and IN file information are not required by
the ERROR program.
Once you have formed the Startup message, send it to the ERROR process using the
WRITE[X] procedure and the file number returned when you opened the ERROR
process:
BUFFER := -1;
BUFFER[21] ':=' ["$RECEIVE", 8 * [" "]];!OUT file
BUFFER[33] := ERROR^NUMBER; !parameter string
BUFFER[34] := 0;
CALL WRITEX(PROCESS^FILENUMBER,SBUFFER,70);
VST102.VSD