Using the SCHEDIRB macro to initialize and schedule an IRB

The SCHEDIRB macro is the recommended interface for initializing an IRB for an asynchronous exit and scheduling the exit routine to run. Use the SCHEDIRB macro to initialize and schedule an exit routine, rather than the CIRB and SCHEDXIT macros.

When you use the SCHEDIRB macro both to initialize the IRB and to schedule the asynchronous exit to run, you can control when it runs by scheduling the IRB for the exit in the following ways:

The best way to use directed IRBs is to make sure that the calling program is running under an IRB. If the system has suppressed asynchronous exits or the current task is in process-must-complete mode when SCHEDIRB is invoked, the calling program will get a non-zero return code unless the calling program is running under an IRB. You can make sure the calling program is running under an IRB by first invoking the SCHEDIRB macro with the TCBPTR option or by invoking the STIMER macro.

Detailed information about coding the SCHEDIRB macro appears in z/OS MVS Programming: Authorized Assembler Services Reference LLA-SDU.

The options you choose to specify on the SCHEDIRB macro affect the characteristics of the asynchronous exit routine. Consider the following when coding the SCHEDIRB macro: