GDSX Manual

LINE^HANDLER Example, Design
Extended General Device Support (GDSX) Manual134303
7-21
The Task Control Block
The LCB contains:
The variable name that contains the name of the LINE object configured with SCF
($LX in this example).
The access name, the name of the file actually opened for the corresponding LINE
($TC1 in this example).
The variable tcbaddr, a pointer to the associated task’s task control block.
ULHDECSE contains USKELEX’s line^template and is included in Appendix C.
The length of an LCB is determined at compile time, unlike the length of a DCB, which
is not established until run time (see “Inspecting the DEVICE^HANDLER Example” on
page 5-14.) The number of LCBs allocated depends on the MAXLINES configuration
parameter supplied at run time. MAXLINES specifies the maximum number of LINEs
that can be configured simultaneously within a GDSX process (those added with SCF
and not started, plus those added and started).
At startup time, linetbl (in the comman^data section of DCCBDECS) is initialized to
point to the array of LCBs, contained in extended memory. The index into this array is
internal^line^no, which is passed by TSCODEs call to the LINE^HANDLER to create
the task associated with the LCB.
Display the internal^line^no parameter (line) passed to the LINE^HANDLER by
TSCODE:
-DISPLAY INTERNAL^LINE^NO
Then observe the contents of the LCB:
-DISPLAY LINETBL[line]
The Task Control Block
Record the displayed tcbaddr value (tcb-address). This is the address of the task
control block of the task that is mapped to the LCB.
Verify the LINE’s name and access name by issuing the following commands:
- DISPLAY LINETBL[line].NAME FOR 6 IN ASCII
- DISPLAY LINETBL[line].ACCESSPOINT FOR 10 IN ASCII
You can display the contents of the LINE^HANDLER’s TCB with the DISPLAY
command:
- DISPLAY (tcb-address) AS TCB^TEMPLATE
Now display the values of the local variables oldest and newest:
- DISPLAY OLDEST
- DISPLAY NEWEST
These are the indexes to the queue of pending ^WRITEREAD IOCBs from
DEVICE^HANDLER tasks. Display the contents of this local array:
- DISPLAY WT^RD^IOCB^LIST