GDSX Manual
DEVICE^HANDLER Example, Design
Extended General Device Support (GDSX) Manual–134303
5-9
The DEVICE^HANDLER Procedure
The section sourced in from ULHDECSE contains a user-customized version of the
template declaration for a device control block (DCB). This type of file allows the
addition of scratchpad variables or user-defined attributes that are specific to a class of
devices.
The config^templates section from DCCBDECS allows programmatic access to the
configuration parameters used by TSCODE.
The config^data section of DCCBDECS contains an allocation of the configuration
template defined in the config^templates section. Common^data contains
miscellaneous globals and DEFINEs.
From EXTDECS0 you source in all the system procedures that you want to use.
PEXTGDS contains EXTERNAL declarations for all TSCODE procedures callable
from USCODE. All the pseudo procedures and the utility procedures are declared in
PEXTGDS.
The DEVICE^HANDLER Procedure
Now the procedure declarations for USKELEX may be examined. Stubs are provided
for all user exits except the DEVICE^HANDLER, LINE^HANDLER, and
USER^STOP, which are customized. The first procedure to be discussed is
DEVICE^HANDLER. USER^STOP is discussed later in this section, and the
LINE^HANDLER, which is never called in the example presented in Sections 4 and 5,
is discussed in Sections 6 and 7.
There are three parameters passed by TSCODE to the DEVICE^HANDLER, shown in
Example 5-2.
Configuration template definition DCCBDECS config^templates
Configuration template allocation DCCBDECS config^data
DEFINEs; various globals allocated DCCBDECS common^data
External procedure declarations EXTDECS0 debug, numout, numin
External procedure declarations for
TSCODE routines
PEXTGDS (Entire file used)
Table 5-1. Global Declarations Sourced in by USKELEX