Using ECBs
By using ECBs, the application program can issue one WAIT macroinstruction for a combination of VTAM® requests and any non-VTAM requests that use ECBs.
For example, an application program can issue three VSAM requests and three VTAM requests. By issuing one WAIT for all six ECBs, the application program resumes processing when any one of the six operations is completed.

Using ECBs, the application program can test ECBs itself and continue to wait only if no ECB has been posted. The application program can prioritize requested operations for LUs by testing some ECBs before testing others. The order of checking can be varied during program execution as circumstances change.
The ECB and RPL exit routines are different. The RPL exit routine schedules automatically when the requested operation completes, thereby saving the application program the trouble of testing ECBs and branching to subroutines. ECBs provide the application program with greater control over the order in which events are handled.
If neither an ECB address nor an RPL exit-routine address is specified in the RPL-based macroinstruction, VTAM uses the ECB-EXIT field of the RPL as an internal ECB, and VTAM (for synchronous operations) or the user (for asynchronous operations) checks and clears it. The ECB-EXIT field can be set to point to an external ECB by using an RPL-based macroinstruction that specifies ECB=ecb address. Once set, it can be reset to an internal ECB by using an RPL-based macroinstruction that specifies ECB=INTERNAL.