Synchronous and asynchronous processing
Depending on the operating environment, an event control block (ECB) can be resident in one of two places: the home address space (in private storage) or in common storage.
- MODE=SYNC
- MODE=SYNCECB
- MODE=SYNCEXIT
- MODE=ASYNCNORESPONSE
- Choosing MODE=SYNC
Choose MODE=SYNC to specify that the request be processed synchronously. When control returns to the caller, all processing on behalf of the request is complete.
- Choosing MODE=SYNCECB
Choose MODE=SYNCECB to specify that the request be processed synchronously, if possible. If the system logger request cannot be completed synchronously, processing on behalf of the request might still be in progress when control returns to the caller (see MODE=ASYNCNORESPONSE). When the asynchronous processing for the request completes, the ECB specified on the system logger request is posted. Once the ECB is posted, the caller can examine the answer area to verify whether the request completed successfully.
- Choosing MODE=ASYNCNORESPONSE
Choose MODE=ASYNCNORESPONSE on the IXGWRITE and IXGDELET requests to specify that the request be processed asynchronously. The caller will not be informed when the request completes. The answer area returned in the ANSAREA parameter and mapped by IXGANSAA is not valid when you specify MODE=ASYNCNORESPONSE.
When a system logger request cannot be completed synchronously, system logger indicates this by returning to the invoking program with a specific return code X'4' and reason code X'401' (IxgRetCodeWarning and IxgRsnCodeProcessedAsynch, re: macro IXGCON).
Before system logger returns control to the caller it schedules an SRB to complete processing of the request. While the SRB runs independent of the requesting task, the SRB might encounter an error from which it cannot recover. The SRB ensures that the error condition is percolated to the task that issued the system logger request.
- SDWACMPC
- The completion code, set to X'1C5'.
- SDWACRC
- The reason code, set to X'85F'.
- SDWACOMU
- The ECB address specified on the ECB keyword when system logger was invoked.
If the caller receives a return code indicating that system logger will process the request asynchronously, the application cannot free certain storage areas.