z/OS Communications Server: SNA Programming
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example of data exchange

z/OS Communications Server: SNA Programming
SC27-3674-00

This data, from a banking application, might be exchanged between an application program and an LU. An application program receives data on a session as the result of issuing RECEIVE. When RECEIVE completes, the input area specified in the AREA operand of RECEIVE contains data. For instance, after completion of RECEIVE, the input area might contain data in this format:

The code might have been typed in by an operator at a terminal associated with the LU. The code is interpreted by the application program as a request for passbook update processing, and control is passed to the routine that handles that processing. The application program might prepare a data reply in this format:

The application program sends the reply to the LU with a SEND macroinstruction, specifying the output area in the AREA operand. Any device-control or format information required to print the data at a printer or keyboard-display unit is furnished by the LU when the data arrives.

In addition to the transaction data, the LU can also send certain control indicators. For example, the application program and the LU can use change-direction indicators to ensure that only one of them at a time is sending (this method of communication is described in more detail later in this chapter). On receiving the request that contains data, the application program also checks the change-direction field of the RPL associated with the completed RECEIVE request:
TESTCB   RPL=(2),CHNGDIR=CMD

TESTCB tests whether a change-direction indicator is set on as part of the request. If not, the program prepares to receive a further request. If the indicator is on in the request, the program can send the reply. When a data reply, such as the preceding passbook update reply, is prepared, the program can indicate in the reply that the next request is to come from the LU. To do this, the program sets the change-direction indicator by specifying SEND CHNGDIR=CMD to send the reply.

The I/O area of the application program sends data only. The LUs specify all control and response information symbolically and receive this information by examining the appropriate fields of the RPL.

Certain control information can be sent only in requests that do not contain data. Examples are given later in this chapter.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014