Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
How a synchronous operation works z/OS Communications Server: SNA Programming SC27-3674-00 |
|
In a synchronous program, operations are performed serially. A request for synchronous operation (for example, SIMLOGON, SEND, or RECEIVE OPTCD=SYN) means that VTAM® does not return control to the next sequential instruction in the application program task or SRB (under MVS™) from which the macroinstruction was issued until after the requested operation is completed. See Serialization of execution for information about running several parts of an application concurrently. Figure 1 illustrates a synchronous operation. Figure 1. Synchronous operation
Note: While the application program is waiting for the event to be
completed, an asynchronous event such as a HALT command could cause
the application program's TPEND exit routine to be entered. Only the
application program task or SRB (under MVS)
from which the macroinstruction was issued is suspended while waiting
for completion of a synchronous operation. The exit routines associated
with the application program are scheduled and executed regardless
of whether the mainline program logic is awaiting completion of a
synchronous operation.
In general, avoid issuing a synchronous request in a task because it suspends all execution under the task until that request completes. Also avoid issuing a synchronous request within an exit routine identified in an ACB exit list. For more information on ACB EXLST exit routines, see Using exit routines. Designing an application program to use synchronous requests while running under an SRB is more reasonable because the number of system resources forced to wait for the completion of the operation is more limited. Refer to Synchronous versus asynchronous operations for further information. The differences between the TCB and SRB modes of execution are described in detail in Execution of exit routines. When a synchronous operation is completed, the application program must determine whether the operation was successful or unsuccessful. The application program does this by testing values in registers 15 and 0 and by examining fields in the RPL used for the operation. For more information on testing return codes from RPL-based macroinstructions, see Handling errors and special conditions, and Return codes and sense fields for RPL-based macroinstructions. |
Copyright IBM Corporation 1990, 2014
|