z/OS MVS Programming: Writing Transaction Programs for APPC/MVS
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using Asynchronous Services

z/OS MVS Programming: Writing Transaction Programs for APPC/MVS
SA23-1397-00

TPs can use most of the APPC/MVS TP conversation services asynchronously by specifying the address of an event control block (ECB) on the Notify_Type parameter. If APPC/MVS accepts the request for asynchronous processing, it gives a return code of zero for the service, and the TP can continue other processing without waiting for the service to complete. When all parameters are returned and the service completes, APPC/MVS notifies the TP by posting the ECB.

By contrast, when you call an APPC/MVS service synchronously (by setting the Notify_Type parameter to a value of none), your TP waits for the service to complete. Your TP regains control when APPC/MVS passes a return code and any other returned parameters from the service.

All conversation services available on synchronous calls are available on asynchronous calls as well.

When specified on the Notify_Type parameter, the ECB must be cleared to zero and meet all requirements for the POST macro. When the ECB is posted to indicate that asynchronous processing is complete, the completion code in the ECB is the return code for the service. All input parameters, except for data buffers, are processed before return to the TP, so that the TP is free to use these areas on return without affecting the asynchronous processing. However, data buffers passed as input, and all output parameters, are accessed and manipulated directly by the asynchronous processing, and therefore should not be referenced or modified by the TP until it has been notified that call processing is complete.

APPC rejects any service call from a conversation for which an asynchronous call was previously issued and did not complete. The only exceptions are Deallocate (ATBDEAL) calls with a deallocate_type of ABEND. Those calls are accepted when the conversation has an outstanding asynchronous call.

The asynchronous capability is recommended for the following types of APPC/MVS transaction programs:
  • Multiprocessing transaction programs
  • Transaction programs that cannot afford to be suspended
  • Transaction programs processing multiple conversations in a single dispatchable unit.
The asynchronous capability is available through the Notify_type parameter on the following TP conversation services:
  • Allocate_Conversation
  • Confirm
  • Confirmed
  • Deallocate_Conversation
  • Flush
  • Prepare_to_Receive
  • Receive_and_Wait
  • Request_to_Send
  • Send_Data
  • Send_Error

Invoking an authorized command or program in a TSO/E session while any asynchronous notifications from APPC/MVS callable services are outstanding is not supported. In addition, asynchronous APPC/MVS calls are not supported across a job step boundary.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014