MPE/iX Intrinsics Reference Manual (32650-90875)
Chapter 8 475
Command Definitions (HPMERGEEND-LOGSTATUS)
IOWAIT
IOWAIT
NM and CM callable.
Initiates completion operations for an I/O request.
Syntax
I16 I16V UDS I16 U16
fnum
:=IOWAIT(
filenum,buffer,length,cstation
);
Functional Return
fnum
16-bit signed integer (assigned functional return)
The file number for which the completion occurred. If no completion
occurred, zero is returned.
Parameters
filenum
16-bit signed integer by value (required)
The file number for which there is a pending I/O request. If you specify 0,
the IOWAIT intrinsic waits for the first I/O completion.
buffer
user-defined structure (optional)
Passes an input buffer. This buffer must be large enough to contain the
input record. It should be the same buffer specified in the original I/O
request if that was a read request. This allows for proper recognition of
EOF where applicable. The buffer parameter is required if not in
priviledged mode, or the buffer parameter can be ommitted if the
GETPRIVMODE intrinsic is called first.
length
16-bit signed integer by reference (optional)
Returns the length of the received or transmitted record. If the original
request specified a byte count, the integer represents bytes; if the request
specified half words, the integer represents half words. This parameter is
pertinent only if the original I/O request was a read request. The FREAD
intrinsic always returns zero as its functional return if you specify nowait
I/O. In this case, the actual record length is returned in the
length
parameter of IOWAIT.
cstation
16-bit unsigned integer by reference (optional)
Returns the number of the calling station when completed (used for
distributed systems).
(ASC) Not used for asynchronous devices.