Using ESS with the ESS User Exit
You can execute Event Services commands through any existing IBM® Connect:Direct® API such as CICS, ISPF, and the batch interface. However, not all IBM Connect:Direct APIs can process synchronous event data received from an EVENT SERVICES START command. In some cases, it is preferable not to have the IBM Connect:Direct API process synchronous event data. The event services exit provides an alternative. Rather than passing synchronous event data back to the API that issued the EVENT SERVICES START (ESS) command, an exit processes the event data.
The ESS exit acts as an extension to the IBM Connect:Direct server. When a synchronous event occurs, IBM Connect:Direct calls the event services exit. An event exit control block is passed for each event and contains the following:
- Address of the event record
- Flags indicating first or last call
- Fields for the user to indicate return code and message
DGA$EVCB, found in $CD.SDGAMAC, maps the event exit control block. The sample exit, DGAXEV01, is in $CD.SDGASAMP.
The event services exit is called as a subtask from IBM Connect:Direct so that the user code waiting for system services does not directly effect IBM Connect:Direct processing. The sample exit (DGAXEV01) writes each event record to a predefined data set. You must modify DGAXEV01 to specify the name of your event exit data set, and you must define the data set to accommodate records up to 2048 bytes in length.