Envoy Application Programming Manual

Table Of Contents
File-System Procedures
Envoy Application Programming Manual427159-001
C-24
READ[X]
If the OPEN call is issued by a backup process and any of the following is true, the
OPEN call is rejected with a condition code of CCL (file-system error 12):
The specified file is not currently open by the primary process.
The parameters specified do not match those supplied when the file was opened by
the primary process.
The primary process is not running.
Condition Codes
Examples
CALL OPEN (line^name,fnum);
line^name is an integer array containing the device name (such as $TRIB7) of the
line. This call opens the specified line for read-write access, exclusive access, and wait
I/O. A unique file number generated by Guardian 90 is deposited in the one-word integer
variable fnum. All subsequent I/O calls directed to the specified line refer to it by this
file number.
CALL OPEN (line^name,fnum,%20,,pri^fnum,proc^id);
line^name is an integer array containing the device name (such as $LINE1) of the
line. %20 is the same flags parameter that the primary process used to open the line,
pri^fnum is an integer variable containing the file number returned by Guardian 90
when the primary process opened the line, and proc^id is an integer variable
containing the process id of the corresponding primary process (such as 008,028). A
unique file number generated by Guardian 90 is deposited in the one-word integer array
fnum. In the backup process, all subsequent I/O calls directed to the specified line refer
to it by fnum.
READ[X]
A call to the READ[X] procedure passes one incoming message plus a two-byte
message control word(MCW) to the specified application buffer. After opening a
communications line your application should always have at least one outstanding
READ[X] call to make certain that if something unexpected comes down the line you
can receive it.
< (CCL) Indicates that the OPEN was successful but an exceptional
condition was detected (call FILEINFO).
= (CCE) Indicates that the OPEN procedure was executed successfully.