GDSX Manual
User Exit Descriptions
Extended General Device Support (GDSX) Manual–134303
9-3
LINE^HANDLER
The value passed by TSCODE is zero, unless the file to be handled is preconfigured 
by an SCF ADD and/or ALTER command with an SUTYPE attribute specified as a 
different type. For example, the following SCF command could be used to add an 
SU with SU type 3, causing TSCODE to pass 3 as the value of terminal-type 
when DEVICE^HANDLER is called:
-> ADD SU $GDSX.#LX.T1, SUTYPE 3
Considerations
•
This procedure operates in an infinite loop to process requests.
•
By setting a DEVICE^HANDLER task’s tcb.statex flag (bits <0:3>) to a nonzero 
value, you can make the task unstoppable.
LINE^HANDLER
This procedure is typically used to allow each requester thread to use a shared resource, 
often a communications line, without allowing the threads to interfere with each other. 
Running copies of LINE^HANDLER code are called LINE^HANDLER tasks. 
A LINE^HANDLER task is created by a call to the LINE^HANDLER procedure as 
follows:
1. When TSCODE receives and processes an SCF START LINE command, TSCODE 
opens the file associated with the LINE and assigns the actual Guardian file number 
to the filenum, to be used by the LINE^HANDLER task to address the file. 
2. TSCODE also creates a $RECEIVE-like file with address receive-number for 
the LINE^HANDLER task to use when picking up messages from the 
DEVICE^HANDLER tasks mapped to the LINE^HANDLER task. 
3. TSCODE then calls the LINE^HANDLER procedure, thereby creating a 
LINE^HANDLER task to manage the LINE. 
When calling the LINE^HANDLER procedure, TSCODE passes filenum and 
receive-number, along with internal-number, which is an index that may be 
used to find the LCB for this LINE in the LINE table.
A DEVICE^HANDLER associated with an SU on a LINE directs its I/O to the 
subdevice to which it is mapped by using filenum. Recognizing filenum as an 
ITC file number, TSCODE pseudo procedures redirect the I/O operations to the in-queue 
file for the associated LINE^HANDLER task. A DEVICE^HANDLER task never 
needs to know the receive-number.
All I/O with the IOP controlling a LINE is identified by filenum. 
PROC LINE^HANDLER ( filenum  ! 
i
 ,internal-number ! 
i
 ,receive-number ); ! 
i










