Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (n - p) PUT_FILE_OPEN_(2)
$RECEIVE One open per process is permitted.
Other Varies by subsystem.
Specifying a nowait_depth value greater than 0 (zero) causes all I/O operations
to be performed in a nowait manner. Nowait I/O operations must be completed
by a call to the AWAITIOX procedure.
Nowait I/O operations on different file numbers (even if for the same file) are
independent, might arrive in any order at the destination, and might be com-
pleted by AWAITIOX in any order.
Nowait opens If you open a file in a nowait manner (options bit 1 = 1) and if
PUT_FILE_OPEN_() returns no error (returns a value of 0 [zero]), the open
operation must be completed by a call to AWAITIOX.
If there is an error, no system message is sent to the object being opened and you
do not need to call AWAITIOX to complete the operation. If there is no error,
the filenum parameter returned by PUT_FILE_OPEN_() is valid; however, you
cannot initiate any I/O operation on the file until you complete the open by cal-
ling AWAITIOX.
If you specify the tag parameter in the call to AWAITIOX, a -30D is returned;
the values returned in the buff er and count parameters to AWAITIOX are
undefined. If an error returns from AWAITIOX, it is your responsibility to close
the file.
For the TMF transaction pseudofile, or for a waited file (nowait_depth =0
[zero]), a request for a nowait open is rejected.
The Guardian file system implementation of a nowait open might use waited
calls in some cases. However, it is guaranteed that the open message is sent
using nowait I/O to a process; the opener does not wait for the process being
opened to service the open message.
Direct and buffered I/O transfers
A file opened by PUT_FILE_OPEN_() uses direct I/O transfers by default;
SETMODE 72 is used to force the system to use an intermediate buffer in the
process file segment (PFS) for I/O transfers. This behavior is unlike the obsoles-
cent Guardian OPEN procedure call, which uses a PFS buffer for I/O transfers by
default.
Sequential block buffering
Sequential block buffering is only supported for disk files. If you are using
sequential block buffering, the file should usually be opened with protected or
exclusive access. You can use shared access, but it is somewhat slower than the
other access methods, and there might be concurrency problems. See the discus-
sion of "Sequential Block Buffering" in the Enscribe Programmers Guide.
Named processes
If you supply a process filename for a named process, it can represent any pro-
cess with the same name. System messages are normally sent to the current pri-
mary process. The exception is when a named process supplies its own name to
PUT_FILE_OPEN_(). In that case, the name refers to the backup process and
system messages are sent to the backup process.
A named process can be represented with or without a sequence number.
PUT_FILE_OPEN_() treats the two name forms differently:
527186-023 Hewlett-Packard Company 5205