processor, are to be performed. The common error bucket is processed by the
specific error processor. However, the thresholds of the common error bucket are
used in determining whether the limit has been reached. Subroutines are provided
in the sample TEP to maintain count and time threshold totals for each error
associated with a particular terminal to assist the error processor to make its
decision. Also available are subroutines for logging the status of the error and any
recovery action taken by the error processor.
You can replace any of the error processors supplied in the sample TEP with
user-written ones. Register linkage conventions, error conditions, DFHTACP default
actions, and sample TEP error processor actions are described in comments given
in the sample DFHXTEP source listing. However, sample DFHXTEP actions, in
many cases, can be altered by changing the thresholds when generating the TEP
tables.
General exit
Control is passed to a general exit routine from each error processor. This routine
determines whether the terminal is to remain in service. If the terminal is to be put
out of service, the terminal error block and all error status elements for that terminal
are deleted from the TEP error table unless the terminal was defined as a
permanent entry. When the terminal is placed back in service, a new terminal error
block is assigned if a subsequent error occurs.
Common subroutines
A number of subroutines are provided in the sample DFHXTEP for use by the error
processors. Each subroutine entry has a label of the form “TEPxxxxx” where
“xxxxx” is the subroutine name. All labels within a subroutine start with TEPx where
“x” is the first character of the subroutine name. All subroutines are arranged within
the module in alphabetical order in the subroutine section. Register conventions and
use of the subroutine are given as comments at the beginning of each subroutine in
the source listing.
The following subroutines are available for writing your own error processors:
TEPACT
Used to output the names of the action bits set by DFHTACP and the sample
DFHTEP in the communication area field TEPCAACT if appropriate PRINT
options are selected when the program is generated.
TEPDEL
Used to delete the terminal error block and error status elements for a terminal
from the TEP error table on exit from an error processor.
TEPHEXCN
Used by TEPPUTTD to convert a 4-bit hexadecimal value to its 8-bit printable
equivalent.
TEPINCR
Used to update and test the count and time threshold totals maintained in the
terminal’s error status element.
TEPLOC
Used to locate or assign terminal error blocks and error status elements for a
terminal ID.
the sample terminal error program
Chapter 8. Writing a terminal error program 421