GDSX Manual
LINE^HANDLER Example, Design
Extended General Device Support (GDSX) Manual–134303
7-19
Other Procedure Declarations
A ^CANCEL on a ^WRITEREAD outstanding to the LINE file does not suspend the
task and is not completed by an ^AWAITIO. A message is sent with a ^WRITE to
indicate what happened to the prompt.
In an exercise in Section 6, an SU was stopped with the SCF ABORT command. The
abort message is sent to TSCODE, which then stops the DEVICE^HANDLER task.
Whenever a task is stopped, the USER^STOP user exit is called by TSCODE. See
Figure 5-10 for this code. If the stopped task, whose TCB address is passed in the call
to USER^STOP, is waiting on a ^WRITEREAD, and is indeed a DEVICE^HANDLER
task (tcb.state is greater than or equal to zero and less than or equal to 15), then
^CANCEL is called on the file to which the task is mapped (tcb.term, which is the same
as the DEVICE^HANDLER task’s terminal file number).
This call cancels the last incomplete operation on the file, the ^WRITEREAD, which in
this case, because the DEVICE^HANDLER effectively uses waited I/O, is also the only
outstanding operation. The ^CANCEL is sent to TSCODE, which finds the IOCB
associated with the request, and puts the IOCB in a canceled state so that the
LINE^HANDLER task can delete it. TSCODE then sends the LINE^HANDLER task
notification of an E^CAN event.
Processing of the E^CAN event is described under “E^CAN“ earlier in this section.
Because the SU was configured under a LINE, dcb.lineno is greater than 0, and no
additional message was written to the LINE file.
Other Procedure Declarations
Other than the LINE^HANDLER, DEVICE^HANDLER, and USER^STOP, all other
user-supplied procedures required by TSCODE, called user exits, are provided as stubs
in USKELEX. See Appendix B for the listing.
Inspecting the LINE^HANDLER Example
The purpose of this exercise is to use Inspect for tracing the operation of a
LINE^HANDLER task and to display the contents of control structures relevant to the
task.
This exercise requires three terminals to be designated the TACL terminal, the Inspect
terminal, and the application terminal. Log on to all three terminals.
At the application terminal, pause the TACL process with the PAUSE command.
Suppose for this example that the terminal’s device name is $TC1.
At the TACL terminal, use CLEAR ALL if necessary to clear any previously set
parameter values, and then issue commands as given in Section 6 to run a
LINE^HANDLER example process:
> PARAM MAXLINES 1
> PARAM EXTSUSIZE 1
> RUN GDSE /NAME $GDS, NOWAIT/