Shunt routine

A shunt is a low-level error handling routine intended for use by language library routines and debug tools. A shunt is typically used when a segment of code needs to protect itself from a likely error. An incorrect address while following a control block chain is an example of an error that activates a shunt routine.

A shunt is usually established for short periods of time while the library routines or debug tools are providing services to the application. Language Environment establishes an ESPIE error recovery routine for program interrupts and an ESTAE recovery routine for abends. These recovery routines check for and setup for retry to a shunt, as appropriate. Shunt routines do not return to the Language Environment condition manager. There is no return code from the shunt routine.