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


Definite, exception, or no response indication

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

In our banking example, the request sent by the LU (requesting a passbook update) might indicate that:
  • No response is returned, whether the request arrived and was processed successfully or not (no response requested).
  • A response is returned only if the request encountered a transmission error or could not be processed successfully (exception response requested). Such a response is called a negative response.
  • A response is returned, whether the request arrived successfully or not and was processed successfully or not (definite response requested). A positive response is returned for a successful operation; a negative response is returned for an unsuccessful operation.

A request for no response is feasible if the LU has its own means of determining failure of the request's transmission, such as using a timer or assuming that the terminal operator resends the request if there is no reply to it from the host processor after a certain length of time. In these cases, neither VTAM® nor the host application program sends a response, because the LU cannot receive it.

Frequently, an LU requests that a response be returned only if the request is not received and processed successfully. If the request is received and processed successfully, no response is returned by the application program. However, if the request is not received successfully, VTAM indicates this in a return code and in additional information provided in RPL fields upon completion of the RECEIVE; the application program then sends a negative response. Even when the request arrives successfully, the VTAM application program, for its own reasons (for example, because it discovers the format of the request is improper), can send back a negative response, using SEND STYPE=RESP. The negative response is indicated by specifying RESPOND=EX; sense information can be provided by using the SSENSEO, SSENSMO, and USENSEO field of the RPL.

In our passbook-update example, if the request is received and processed successfully and a definite response was requested, the VTAM application program sends a positive response, using a SEND macroinstruction and specifying STYPE=RESP (a response) and RESPOND=NEX (positive). If some requests require a definite response and others do not, the application program determines whether to send a response by testing for a NEX indication in the RESPOND field of the RPL associated with a completed RECEIVE.

Figure 1 illustrates the LU requesting (A) that a response be returned in either case and (B) that a response be returned only if the request does not arrive or is not processed successfully. Figure 1 also shows (C) how the application program receives an exception request from VTAM.

Figure 1. Receiving requests from an LU
A diagram that explains 3 cases of receiving requests from an LU. In case A, the LU requests a definite response. If the application program receives and processes the request normally, it returns a positive response. But if the application program detects an error in the request or can not proceed the request successfully, it returns a negative response. In case B, the LU request indicates only an exception response is requested. If the application program receives and proceeds normally, it returns nothing. But if the application program detects an error in the request or can not process the request successfully, it returns a negative response. In case C, when VTAM detects an error and sends an exception request to the application program, the application program returns a negative response.

Again, in the passbook-update example, when the application program sends the request that it prepares after performing the passbook update, the application program indicates the type of response it wants (no response, a response to an unsuccessful request only, or a response to every successful and unsuccessful request). The application program does this by specifying an appropriate indication in the RESPOND operand of the SEND macroinstruction. If a response is requested, it is usually received by the application program either by RECEIVE RTYPE=RESP or by VTAM's scheduling the program's RESP exit routine. When the RESPOND field of the SEND RPL is set to NEX and the SEND macroinstruction includes the POST=RESP option, the SEND is not completed until the response is received. In this case, RECEIVE is not used to obtain the response; the response information is available in the SEND RPL when the operation is complete.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014