gtpi1m08System Installation Support Reference

Control Program User Exits Overview

User exits allow you to add user-unique processing at various points in TPF programs without having to modify the released programs. Control program user exits are called by control program exit points that reside in control program CSECTs.

Note:
User exits can affect system performance. Therefore, have detailed knowledge of TPF system internals before activating or writing user exit code.

Figure 1 shows an overview of control program user exit processing. When the TPF control program encounters a exit point that is not active, control program processing continues. When the TPF control program encounters an active exit point, control is passed to the User Exit Interface (UXITC). The UXITC macro generates linkage to insure that the interfaces are standard among all exit points (as exit points are scattered throughout the control program). Control is then passed to the control program CSECT CCUEXT. CSECT CCUEXT, that contains the copy member CUSR, then passes control to the user exit for user processing. If the user exit routine does not cause the current ECB to give up control of the CPU, the routine can return to the NSI in the exit point interface. If the user exit routine gives up control of the CPU, user processing is suspended for the ECB and the stack pointer (R13) and the contents of the stack area are lost.

Note:
The user exit must restore the stack pointer (R13) and registers before it returns to the NSI in the exit point.

Figure 1. Relationship of TPF Function, Exit Point, and User Processing




If the user wants to resume processing the ECB later, the ECB can be placed on a CPU loop (task dispatcher) list with the Postinterrupt address label, UXPI. This causes control to be passed to the General Post Interrupt routine (UXGPIR in CSECT CCUEXT) which reactivates the ECB when it is removed from the task dispatcher list (see General Postinterrupt Processing).

Note:
A direct return to the CPU Loop from the System Error user exit MUST NOT be attempted. An interface has been provided for this purpose. For more information, see "Programming Considerations" comments for the System Error user exit in the CSECT CCUEXT code.