Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Sequence numbers z/OS Communications Server: SNA Programming SC27-3674-00 |
|
The transmission services (TS) profile might indicate that the session is to use sequence numbers. If so, each normal-flow request sent by an application program to an LU is assigned a sequence number by VTAM®. The sender knows this number as the outbound sequence number; the receiver knows the number as the inbound sequence number. The numbering begins with 1 for the first normal-flow request sent after BIND and is increased by 1 for each subsequent request. This process continues until the session is terminated. Sequence numbers can be reset during the session. See Controlling flow for a description of session-control requests. (Also, either the application program or VTAM assigns an identification number to each expedited-flow request sent in a session, but those numbers are handled separately from the normal-flow sequence numbers.) Similarly, an LU in session with an application program assigns a sequence number to each normal-flow request it sends to the application program. The numbering begins with 1 and is increased by 1 for each subsequent normal-flow request that the LU sends. To the LU, this number is known as the outbound sequence number. To the application program, the number is known as the inbound sequence number. VTAM checks the inbound sequence numbers on the normal-flow requests it receives that are destined for an application program. If a request arrives out of sequence (that is, its sequence number is not 1 greater than that of the last normal-flow request received on the session), VTAM considers this to be a transmission error and indicates to the application program that an out-of-sequence request has been received by passing an exception request to the application program. When a normal-flow response is sent (either a positive or a negative response), the response sender usually assigns to it the sequence number of the request being responded to. This provides the request sender (the response receiver) a way to match the response with its request. For example, an application program can send a group of requests, with each request indicating that only exception responses should be returned. If the session partner returns a negative response, the application program can use the sequence number to determine where in the group the error occurred. However, for certain situations, the error can be localized only to a chain. Sequence numbers are also useful for LUs that log each request that is received or sent. Figure 1 illustrates how sequence numbers are used. Other examples in this chapter show more specific examples of their use. Figure 1. How sequence numbers are used
The SEQNO field of the RPL is used to convey sequence numbers between VTAM and the application program. The application program can determine the sequence number that VTAM assigned to an outbound normal-flow request by checking the SEQNO field after completion of the SEND macroinstruction. For an inbound request or response, the application program determines the sequence number that was contained in the request or response by examining the SEQNO field after completion of the RECEIVE macroinstruction. To assign a sequence number to an outgoing response, the application program puts the sequence number into the SEQNO field before issuing the SEND macroinstruction. For a description of how sequence numbers are assigned when OPTCD=LMPEO is used, refer to LMPEO sequence number handling. When OPTCD=LMPEO is specified, the OBSQVAL RPL field is also used. The application program can also assign sequence numbers when sending expedited data-flow-control requests (such as a Signal request). For these requests, VTAM uses the current setting of the SEQNO field of the SEND RPL instead of generating a sequence number. This allows the application program to use the SEQNO field as another data field (for example, to relate a Signal request to a particular bracket). VTAM generates sequence numbers for all session-control requests whether sent by VTAM (such as UNBIND), or by the application program (such as RQR). In summary, when sending a response or an expedited data-flow-control request, the application program specifies the sequence number. When sending a normal-flow request or a session-control request, VTAM generates the sequence number. |
Copyright IBM Corporation 1990, 2014
|