In the following diagram, for example, Dialog A on the PC establishes a conversation with Dialog B on the mainframe. Dialog A sends a request for employee information to Dialog B. Dialog B processes the request and returns a reply. Matching data is found and returned. This is the same application shown in the flowchart earlier in this chapter.
The state changes are noted under the communications commands. Refer back to the previous flowchart and the sample code if you wish. You can see that Dialog B uses a RECEIVE-AND-WAIT to switch the line (changing from receive to send state in preparation for returning data to the PC). Also note the state changes necessary to deallocate the conversation. (Here, WR represents the WHAT-RECEIVED system field.)
A Successful Transaction
Dialog A Dialog B
(A1) ALLOCATE (B1) CONTROL SESSION
State (reset to send) State (receive)
(A2) SEND-DATA Emp-id (B2) RECEIVE-AND-WAIT Emp-id
State (send) State (receive)
WR=DATA-COMPLETE
(A3) RECEIVE-AND-WAIT Emp-data
State (send to receive) (B3) RECEIVE-AND-WAIT
State (receive to send)
WR=SEND
(A6) RECEIVE-AND-WAIT. (B5) SEND-DATA Emp-data
State (receive to State (send)
deallocate)
(A7) DEALLOCATE (B6) DEALLOCATE
State (deallocate to State (send to reset)
reset)
In this transaction:
|
Copyright © 2014 CA.
All rights reserved.
|
|