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


RESP exit routine

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

The RESP exit routine provides a way for VTAM® to notify an application program when a response to a normal-flow request (data or data-flow-control) has arrived.

The RESP exit routine is one of three ways an application program can be notified of receipt of a normal-flow response (other than a DFSYN response). The other two ways are:
  • Specifying POST=RESP in the macroinstruction used to send the normal-flow request. If this is done, the macroinstruction is not completed until the response is received.
  • Maintaining an active RECEIVE RTYPE=RESP that is completed when a normal-flow response is received.

Using an RESP exit routine is an alternative to getting each normal-flow response with a RECEIVE RTYPE=RESP macroinstruction. The advantages and disadvantages of the two alternatives are discussed in Explicit RECEIVEs and EXLST exit routines.

If an RESP exit routine is specified in an NIB or ACB EXLST applicable to the session, whenever a normal-flow response arrives, VTAM can schedule that RESP exit routine. The detailed manner in which VTAM handles RESP input is shown in Figure 1 and Figure 3. Certain normal-flow responses are considered DFSYN input instead of RESP input and therefore do not schedule an RESP exit. For normal-flow responses other than DFSYN responses, if a NIB RESP exit routine is specified, it is always scheduled; however, a specified ACB exit routine is scheduled only if:
  • No NIB exit routine is specified.
  • The NIB for the session specified RESPX.
  • The session is in CA mode for RESP input.
  • No RECEIVE OPTCD=SPEC,RTYPE=RESP macroinstruction is queued.
For an RESP exit routine, information on the normal-flow response that has been received is available in a read-only RPL provided by VTAM. This RPL resides in read-only VTAM storage and cannot be used by RPL-based macroinstructions. The following are also true for this RPL:
  • The application program uses SHOWCB, TESTCB, or IFGRPL DSECT to examine the RPL fields.
  • The 3-byte user RH field is set (see Operation for inbound RUs for more information).
  • All feedback fields (except REQ) are set exactly as they would be following RECEIVE RTYPE=RESP.
  • CHECK must not be issued for the RPL.
  • RPL is freed when control returns to VTAM.
The location of the read-only RPL is provided in the parameter list passed to the exit routine when the routine is scheduled.
Note: Be aware that an RESP exit routine, which is scheduled for execution before the application program issues CLSDST, cannot be executed until after the CLSDST completes.
Table 1. RESP exit routine: Registers upon entry
Reg Contents
0, 2-13 Unpredictable
1 Address of a parameter list that includes the following:
  • Word 1—address of ACB of application program to which the response is sent
  • Word 2—CID of the session
  • Word 3—USERFLD contents from NIB that is used to establish the session
  • Word 4—reserved
  • Word 5—address of a VTAM-supplied, read-only RPL
  • Words 6, 7—reserved
14 VTAM address that is branched to when RESP exit routine completes processing
15 Address of RESP exit routine

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014