GDSX Manual

DEVICE^HANDLER Example, Design
Extended General Device Support (GDSX) Manual134303
5-14
Inspecting the DEVICE^HANDLER Example
under “The USER^STOP Procedure” on page 5-18). Any file-system error is passed
back to the requester application. The processing for WRITE and for READ is similar.
Incoming datastream conversion could be implemented by a procedure called
immediately before ^REPLY when processing READ and WRITEREAD requests.
CONTROL and SETMODE requests are passed through the DEVICE^HANDLER. If a
CTRL message is received, ^CONTROL is called, passing the first two characters of the
receiving buffer. The completion gives file-system error information, which is passed on
to the requester. SETMODE processing is similar.
Before returning to the beginning of the loop, the terminal buffer and the receiving
buffer are released.
Inspecting the DEVICE^HANDLER Example
The next part of the tutorial uses the Inspect utility to trace the operation of the
DEVICE^HANDLER example and to display the contents of relevant control structures.
It may be unnecessary to do this part if you are working with or developing a simple
DEVICE^HANDLER procedure that does not manipulate the contents of control blocks
shared with TSCODE. This tutorial useful if:
Your DEVICE^HANDLER manipulates control structures.
You are working with or developing a LINE^HANDLER.
You are debugging a GDSX subsystem.
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 4 to run a
DEVICE^HANDLER process:
> PARAM EXTSUSIZE 1
> RUN GDSE /NAME $GDS, NOWAIT/
Start an application process, named $A1 in this example:
> RUN APPL /NAME $A1, OUT $GDS.#TC1, NOWAIT/
The application terminal should now display a prompt.
At the Inspect terminal, PAUSE the TACL process. Suppose for this example that the
terminal’s device name is $TC2.
At the TACL terminal, bring your GDSX process under the control of Inspect by
entering:
> DEBUG $GDS, TERM $TC2