Envoy Application Programming Manual

Table Of Contents
File-System Procedures
Envoy Application Programming Manual427159-001
C-22
OPEN
filenum input
INT:value
is the number returned by the OPEN call that opened the line. In a HALTPOLL call,
you supply this variable to Envoy.
Condition Codes
Example
CALL HALTPOLL (fnum);
where fnum is the one-word integer variable specified in the OPEN call that opened the
particular communications line.
OPEN
A call to the OPEN procedure obtains access to a specified communications line. The
line is always open for exclusive read-write access; the only other user process that can
open the same line is the backup process associated with the primary process that
already has the line open.
The form of the OPEN procedure is:
file-name input
INT:ref:12
is an array that you supply; it contains the device name assigned to the particular
communications line at system generation ($BSC3 or $LINE5, for example).
filenum output
INT:ref:1
is the name of a one-word integer variable into which Guardian 90 places a file
number that uniquely identifies this particular opening of the specified line. All
subsequent procedure calls associated with the particular line refer to the line by this
file number.
< (CCL) Indicates that an error occurred (call FILEINFO).
= (CCE) Indicates that the HALTPOLL procedure was executed successfully.
CALL OPEN ( file-name [ .#subdevice-name ] !i
, filenum !o
, [flags] !i
,
, [primary-filenum] !i
, [primary-process-id]); !i