gtpi1m08 | System Installation Support Reference |
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.
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.
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).