Guardian Programmer's Guide

Table Of Contents
Communicating With Processes
Guardian Programmer’s Guide 421922-014
6 - 27
Receiving System Messages
Receiving System Messages
To receive system messages, your program needs to perform the following operations:
Open $RECEIVE so that your program is able to receive system messages.
Choose to read D-series system messages (the default) or C-series system
messages.
Read system messages.
The following paragraphs describe how to perform these operations.
Opening $RECEIVE to Receive System Messages
You can choose to receive or not to receive system messages in the $RECEIVE file.
The choice is made when you open $RECEIVE with the FILE_OPEN_ procedure. If bit
15 of the options parameter is equal to 0 (the default value), then your server
process will receive system messages:
FILE^NAME ':=' "$RECEIVE";
LENGTH := 8;
OPTIONS := 0;
ERROR := FILE_OPEN_(FILE^NAME:LENGTH,
RECV^NUM,
!access!,
!exclusion!,
!nowait^depth!,
!sync^depth!,
OPTIONS);
IF ERROR <> 0 THEN ...
If bit 15 of the options parameter is set to 1, then your process will not receive
system messages:
FILE^NAME ':=' "$RECEIVE";
LENGTH := 8;
OPTIONS.<15> := 1;
ERROR := FILE_OPEN_(FILE^NAME:LENGTH,
RECV^NUM,
!access!,
!exclusion!,
!nowait^depth!,
!sync^depth!,
OPTIONS);
IF ERROR <> 0 THEN ...