Envoy Application Programming Manual

Table Of Contents
File-System Procedures
Envoy Application Programming Manual427159-001
C-23
OPEN
flags input
INT:value
is an integer value that you supply; its individual bits specify certain characteristics
about the line. The format of flags is:
(MSB) 0 15 (LSB)
0 00x xx0 00y yyz zzz
xxx (bits 3-5)
specify the desired access mode:
000 = read/write
001 = read only
010 = write only
yyy (bits 9-11)
specify the desired exclusion mode:
000 = shared
001 = exclusive
011 = protected
zzzz (bits 12-15)
specify wait or nowait I/O:
0000 = wait I/O
>0000 = nowait I/O (specify the maximum number of concurrent
operations)
Regardless of how you set the flag bits in an OPEN call, Envoy always considers its
lines to be opened for exclusive read-write access and treats them accordingly. Once
a line is open, any subsequent attempt to open the same line is rejected with a
condition code of CCL (file-system error 12). The only exception is that a backup
process may open the same line if it includes the proper primary file number and
primary process id parameters in its OPEN call.
primary-filenum input
INT:value
is an integer variable you supply when you open the line for a backup process; it
specifies the file number returned to the corresponding primary process when it
opened the line.
primary-process-id input
INT:ref
is an integer variable you supply when you open the line for a backup process; it
specifies the process ID of the corresponding primary process.