Using asynchronous exit routines
An authorized caller can request an asynchronous exit routine to run on behalf of a specific task.
Before the asynchronous exit routine runs, the calling program must initialize an interrupt request block (IRB) to identify the exit to the system and then schedule the asynchronous exit to run. The system then completes processing to get the asynchronous exit ready to run. See System processing to run an asynchronous exit.
- Initialize an IRB - The SCHEDIRB macro is the recommended interface
for initializing an IRB for an asynchronous exit routine. See Using the SCHEDIRB macro to initialize and schedule an IRB.
You can also use the CIRB macro to initialize IRBs. This method allows you to reuse IRBs. See Using the CIRB macro to initialize an IRB.
- Schedule the asynchronous exit - The SCHEDIRB macro is the IBM® recommended interface for scheduling
an asynchronous exit. Using SCHEDIRB both to initialize and to schedule
the IRB allows you more control over when your exit runs.
If you initialized the IRB for the exit using the CIRB macro, you can also use the SCHEDXIT macro to schedule your asynchronous exit, see Using the SCHEDXIT macro to schedule an IRB.
Asynchronous exits (IRBs) must save and restore all the Floating Point Registers and the Floating Point Control register if they use them. If an asynchronous exit uses Binary Floating Point (BFP) instructions, it can cause the IEEE exception flags and DXC in the Floating Point Control (FPC) register to change at unpredictable times relative to the main program. Therefore, asynchronous exits that use BFP instructions must save and restore the entire Floating Point Control register.