Terminal error program (DFHTEP)
You can specify your own processing for non- z/OS® Communications Server communication errors in a terminal error program (TEP). You can use the sample TEP supplied with CICS® (DFHXTEP), change the sample, or write your own.
The TEP is entered once for each terminal error, and therefore should be designed to process only one error for each invocation.