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


Receiving input on any session except those already in communication

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

About this task

VTAM® provides a way of receiving input on any session. To do this, RECEIVE OPTCD=ANY is issued. On completion, the identity (the CID) of the session from which input has been received is in the RPLARG field associated with the RECEIVE request. (The INQUIRE macroinstruction with the CIDXLATE option can be used to translate the CID into the symbolic name of the LU with which the application program has that session.) Typically, RECEIVE OPTCD=ANY is issued to receive the initial input that leads to communication in a particular session with a LU.

Once RECEIVE OPTCD=ANY has been used to get initial input on a session, that session can be switched to another mode called continue-specific mode. When a session is in this mode, a request on that session does not satisfy RECEIVE OPTCD=ANY; the request can satisfy only a RECEIVE OPTCD=SPEC whose RPL identifies the session on which the request was received. While the session is in continue-specific mode, the application program maintains specific control over each request sent or received on the session.

Thus, an application program can consist of a single RECEIVE OPTCD=ANY that is reissued each time it is completed, and of sets of specific RECEIVE and SEND macroinstructions, with each set of specific macroinstructions controlling communication on a particular session. To obtain the continue-specific facility, OPTCD=CS is specified in the request at the point at which the session is to be switched to continue-specific mode. For example, the RECEIVE that reads input on any session (except those already in continue-specific mode) specifies OPTCD=(ANY,CS). This places the session whose input satisfied RECEIVE in continue-specific mode; the next issuance of RECEIVE OPTCD=ANY excludes this session from being able to complete RECEIVE. Logic of a more complicated application program, shows use of RECEIVE OPTCD=(ANY,CS).

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014