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


Simple One-Way Conversation

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

Figure 1. One-Way Conversation
┌─────────┐                                 ┌─────────┐
│ PROGRAM │                                 │ PROGRAM │
│         │←───────────────────────────────→│         │
│    A    │                                 │    B    │
└─────────┘                                 └─────────┘
 (RUNNING)

Call ATBALC2 (Allocate)    1 
  Sym_Dest_Name(Mypartner)


Call ATBSEND (Send_Data)   2 

Call ATBDEAL               3 
(Deallocate) ─────────────────────────────→ (LU STARTS TP B)
              ALLOCATE, DATA, DEALLOCATE

                                        4   Call ATBGETC (Get_Conversation)

                                        5   Call ATBRCVW (Receive_and_Wait)
(END CONVERSATION)                          DATA_RECEIVED=DATA_COMPLETE
                                            RC=DEALLOCATE-NORMAL
Any APPC conversation includes three phases: initialization, data exchange, and termination. In Figure 1, a local MVS transaction program (program A) initiates the conversation, sends data to its partner (program B), and ends the conversation.
  1. The Allocate service initializes the conversation, specifying the partner with a symbolic destination name. That name corresponds to a side information entry naming program B and identifying program B's LU name and the session mode name.
  2. The Send_Data service specifies that a block of data be put in a buffer for sending.
  3. The Deallocate service notifies APPC that this is the end of the conversation, forcing the LU to send the buffered data. The output from the three above services (allocate, data, deallocate) crosses the network; APPC uses the output from the Allocate service to initialize program B.
  4. Program B issues the Get_Conversation service to get information about the caller (program A).
  5. Program B issues the Receive_and_Wait service to receive the data. The data_received parameter and return code tell program B that the data was complete and that the conversation was deallocated.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014