GDSX Manual
Design and Development
Extended General Device Support (GDSX) Manual–134303
2-98
The LINE^HANDLER Procedure
completed with file error 31 (FENOBUFSPACE) instead of trapping the
LINE^HANDLER. This is done to handle the case where the DEVICE^HANDLER
task requesting this I/O terminates during the wait for a buffer.
Assuming that a buffer is allocated, the text portion of the received message is moved
into that buffer. In the process:
•
The variable ab is set to point to the user’s buffer.
•
The variable asb is set to point to the next available byte in the buffer.
If an error other than 176 has occurred on the read, there is an attempt to dump the error
on the reader of the device.
To wrap up processing, the IOCB associated with the Envoy READ operation is
deallocated and a result is returned:
If no error occurred, another READ is posted on the line. When this READ completes,
the subprocedure CONTINUATION^READ is called. CONTINUATION^READ
ensures that aiocb is nonzero, then determines if an EOT was received from the
device. If it was, the number of bytes read is stored in aiocb.iocnt, and the request is
completed. If no error occurred, another block of this input message has been received.
Using asb, the text from this message is appended to the end of the user’s buffer. In
this case, another read is initiated on the line and CONTINUATION^READ is called
again. If an error occurred on the read, the user task’s READ request is completed to
return the error.
As a final step, CONTINUATION^READ deallocates the IOCB associated with the
Envoy READ operation and returns:
When a WRITE or WRITEREAD operation is initiated on a line, the subprocedure
WRITE^ACTION is called. Before this call, the subprocedure LOOK has set adcb to
point to the DCB for the subdevice targeted for the write.
WRITE^ACTION verifies that adcb has a current WRITE or WRITEREAD request. If
this is not the case, a trap occurs. Otherwise, the appropriate control characters are
added to the DEVICE^HANDLER-supplied text and the WRITE or WRITEREAD
operation is initiated.
When the I/O completes, the subprocedure WRITE^COMPLETE is called. The
DEVICE^HANDLER task request is completed with any error that occurred, and the
IOCB associated with the Envoy WRITE operation is returned.
0 Error other than 176 occurred
1 Error 176
2 No error
0 Error occurred
1 EOT received
2 Text received