IOWAIT [ SNA IMF Programmer's Reference Manual ] MPE/iX 5.0 Documentation
SNA IMF Programmer's Reference Manual
IOWAIT
For SNA IMF/V only.IT
waits for the completion of a previous no-wait I/O request.
Syntax
___________________________________________________
| |
| IV LA I L |
| IOWAIT (filenum, target, tcount, cstation|
___________________________________________________
Parameters
filenum (input)
Integer identifier specifying the file number or SNA IMF terminalid for
which an I/O request is pending. If you specify zero, IOWAIT checks to
see if any no-wait I/O request in your program has completed. filenum
is a required parameter.
target (input)
Logical array. The target parameter has no meaning for SNA IMF. If you
omit this parameter, be sure to retain the comma.
tcount (output)
Integer. The tcount parameter has no meaning for SNA IMF. If you omit
this parameter, be sure to retain the comma.
cstation (output)
Integer that can contain selected SNA IMF result codes. The codes
returned in cstation could, with wait I/O, be returned through the
result parameter of either the RECV3270 or the TRAN3270 intrinsic.
Several other result codes may be returned through IOWAIT, instead of
either RECV3270 or TRAN3270, if the condition causing them arises during
I/O.
The following codes can be returned through the cstation parameter of
the IOWAIT intrinsic:
0 = Successful completion.
23 = Keyboard enable timeout has occurred.
24 = Response timeout has occurred.
91 = LU.T1 bind received.
92 = Unbind received.
93 = LU.T3 bind received.
94 = HOLDPRINT timer has expired (10 minutes).
95 = Host application requests PA key entry.
301 = Illegal DB register.
303 = Invalid SNA catalog file.
305 = Parameter bounds violation.
307 = Session is active.
308 = Session is inactive.
315 = Internal Error.
319 = LU-SSCP message pending.
320 = RU buffer too small.
336 = Link shutdown occurred.
337 = Protocol shutdown requested.
338 = Quiesce shutdown requested.
340 = No stack space.
348 = Invalid data offset.
351 = Link Failure occurred.
352 = Transport Internal Error Shutdown.
353 = Hierarchical Shutdown.
Description
Use IOWAIT with no-wait MPE V I/O. IOWAIT suspends processing until an
outstanding I/O request completes. IOWAIT is also an MPE V and MPE XL
intrinsic. See the MPE V Intrinsics Reference Manual Intrinsics
Reference Manualrmation.
If you open an SNA IMF/V device, specifying no-wait I/O in your call to
the OPEN3270 intrinsic, you must follow every RECV3270 and TRAN3270
request with a call to either IODONTWAIT or IOWAIT, before you can call
any other intrinsic. You can delay the call to IODONTWAIT or IOWAIT as
long as necessary to allow effective I/O and processing overlap.
The IOWAIT intrinsic acts the same as the IODONTWAIT intrinsic with one
exception: if your program calls IOWAIT, and no I/O has completed, your
program is suspended until some I/O completes; if your program calls
IODONTWAIT, and no I/O has completed, control is returned to your
program.
You can call IOWAIT from programs written in SPL, COBOL II, Pascal, or
FORTRAN.
SPL Procedure Declaration
INTEGER PROCEDURE IOWAIT (FILENUM, TARGET, TCOUNT,
CSTATION);
INTEGER FILENUM,TCOUNT;
LOGICAL CSTATION;
LOGICAL ARRAY TARGET;
OPTION VARIABLE;
IOWAIT has a functional return, as shown below in the calling sequence.
The IOWAIT intrinsic returns an integer that represents the terminalid
for which the I/O completion occurred. If no completion occurred, zero
is returned in FNUM.
SPL Calling Sequence
FNUM:=IOWAIT (FILENUM, TARGET, TCOUNT, CSTATION);
Condition Codes
CCE
Request granted. If the functional return is non-zero, then I/O
completion occurred with no errors. If the return is zero, then no I/O
has completed.
CCG
An end of file was encountered.
CCL
Request denied. Normal I/O completion did not occur because there were
no I/O requests pending, a parameter error occurred, or an abnormal I/O
completion occurred.
MPE/iX 5.0 Documentation