GDSX Manual
User Exit Descriptions
Extended General Device Support (GDSX) Manual–134303
9-2
DEVICE^HANDLER
A DEVICE^HANDLER task is created by a call to the DEVICE^HANDLER procedure
as follows:
1. When TSCODE receives and processes an SCF START SU command, or when the
first open message is received by TSCODE for an SU, TSCODE opens the file to
which the SU is mapped.
2. The SU file is opened for nowait I/O (the OPEN flags parameter is set to a value
that is greater than or equal to 1).
3. TSCODE assigns the opened file a file number, an actual Guardian file number or an
ITC file number, and passes the file number when calling DEVICE^HANDLER.
Each request sent from a DEVICE^HANDLER task to a subdevice under a LINE does
not go directly to the subdevice. The I/O operation is sent first to the LINE^HANDLER
task associated with the subdevice. Nevertheless, the DEVICE^HANDLER task sends
I/O to the file number, just as it would if there were no LINE^HANDLER. TSCODE
handles the routing of the message to the LINE^HANDLER.
filenum input
INT:value
is the file number or ITC file number of the file that the DEVICE^HANDLER task
is to handle. The file is often a terminal. When this user exit is called, TSCODE
has already opened this file with the flags parameter of OPEN set to a value that
is greater than or equal to 1, and assigned filenum, which is the same as the actual
Guardian file number if the corresponding SU is not configured under a LINE.
internal-number input
INT:value
is the unique GDSX internal number for the file associated with this task. This
number may be used to identify the file in user-generated log messages, and may
also be used as an index into an array of pointers to the DCB table. (The DCB may
be used to access information about the file associated with this task.)
terminal-type input
INT:value
is the terminal type, which may be used to inform the task of the type of terminal it
is to support or the subset of DEVICE^HANDLER code that the task is to execute.
Use of terminal-type is completely
application-dependent. TSCODE does not
use this variable.
PROC DEVICE^HANDLER ( filenum !
i
,internal-number !
i
,terminal-type ); !
i