POST interface with exit routines
Before giving the exit control, POST checks to ensure that the user's exit routine address identified in the ECB extension denotes a valid POST exit routine. Even though POST thereby makes sure that a valid system exit receives control, the exit routine must ensure that an unauthorized routine has not counterfeited the extended ECB/ECB extension pair (by keeping the ECB/ECB extension pair in system key storage, for example).
- Register
- Contents
- 0
- Address of the currently posted ECB
- 1
- Address of related ECB extension
- 2-13
- Unpredictable
- 14
- Return address
- 15
- Exit routine entry point address
Registers 11 and 14 must remain unchanged upon return to POST from the user's routine.
The user's exit routine must return control in supervisor state, PSW key zero and with the LOCAL lock still held.
For performance reasons, the user's routine should not cause page faults (that is, the routine's code and the data that it references should be in fixed or DREF storage when the routine receives control).
When you use an extended ECB on the POST macro and HASN (the home address space) doesn't equal PASN (the primary address space), use LINKAGE=SYSTEM with the ERRET parameter. The POST service then assumes that the extended ECB is in the primary address space and schedules an asynchronous cross-memory POST. The only way that such a POST can inform the requestor of an error condition is through an ERRET routine.
When you specify LINKAGE=SYSTEM, the POST macro service issues a return code. Return code 4 indicates that the system will perform the POST asynchronously. If you specified the ERRET parameter on the POST macro and an error occurs during asynchronous POST processing, MVS™ invokes the routine identified on the ERRET parameter. If your program is unauthorized and you specify ERRET, the POST is done asynchronously, but the error routine will not get control in the event of an error. Return code 8 indicates this condition.