Envoy ACP/XF Application Programming Manual
EnvoyACP/XF and the Application Task
EnvoyACP/XF Application Programming Manual–132179
1-5
Multiple FILE_OPEN_ Calls
If you need to issue more than 15 READ or WRITE calls, you can issue multiple 
FILE_OPEN_ calls. EnvoyACP/XF supports multiple FILE_OPEN_ calls for all 
protocols. 
In a FILE_OPEN_ call, you specify the following variables by setting certain bits in the 
flags parameter, such as:
•
Read or write access to the line (for all protocols)
•
Shared access (in extended mode, when your application opens the line more than 
once) 
•
Waited or nowait I/O 
When you open a line only once, use the configured line name as the first variable; when 
the FILE_OPEN_ procedure completes, the second parameter, filenum, contains a 
unique file number returned by the file system. Your application must specify these file 
numbers in subsequent procedure calls.
When you open a line more than once, you also use the configured line name as the first 
variable in each FILE_OPEN_ call. For each separate FILE_OPEN_ call, however, the 
file system places a different file number into the filenum parameter. Your application 
must specify these file numbers in subsequent procedure calls, such as READ and 
WRITE.
Although it does not matter which calls are issued to which file numbers, you should 
reserve certain file numbers—and thus line openings—for specialized functions. For 
example, you might reserve one open file for READ and WRITEREAD calls and the 
rest for WRITE calls.
Multiple FILE_OPEN_ Calls
A call to the FILE_OPEN_ procedure gets access to the specified communications line. 
EnvoyACP/XF allows you to issue multiple FILE_OPEN_ calls for the same 
EnvoyACP/XF line. All the FILE_OPEN_ calls to a particular line must originate from a 
single user process except when a backup process duplicates the FILE_OPEN_ calls of 
its associated primary process. 
Note. When more than one user opens a line, all users must synchronize the request to the 
EnvoyACP/XF process. If you want to prevent another user from accessing a line, use the 
exclusion mode within FILE_OPEN_. See the Guardian Procedure Calls Reference Manual for 
details on using the exclusion mode.
waited IO The I/O operation completes before control passes to the next 
instruction. 
nowait I/O A procedure call initiates an operation. Control passes immediately 
to the next instruction. The I/O operation is logically completed by a 
call to AWAITIO later in the program. 
If you choose nowait I/O, any FILE_OPEN_ calls that you issue 
must specify a nowait depth, that is, the number of I/O operations 
that can be outstanding at one time for that particular line 
FILE_OPEN_. 










