gtps2m0s | ACF/SNA Data Communications Reference |
A sequence number is an arbitrarily assigned message number. Both TPF and the 3601 control program assign sequence numbers to output messages. Additionally, each maintains a record of these numbers for both input and output messages. Messages are synchronized via sequence numbers to ensure their integrity. TPF and the 3601 control program share responsibility for sequence number management.
The 3601 adds 1 to the sequence number each time a logical unit transmits data. The 3601 appends this new number to the data and sends the message. On receipt of the message, TPF adds 1 to the last sequence number it recorded. TPF compares this number with the number of the message just received. If the sequence numbers match, TPF processes the message. Otherwise, TPF returns a negative response indicating a sequence number error. The 3601 performs the same function for messages received from TPF. When TPF detects the error, the logical unit should request resynchronization of messages via the SNA Request-Recovery (RQR) command. When the 3601 detects the error, TPF automatically starts message resynchronization via the SNA Set-and-Test Sequence Numbers (STSN) command.
The STSN command contains a 5-byte data field. Byte zero (1) is called the action code and is defined in Figure 6.
Figure 6. TPF Sent Set-and-Test Sequence Numbers Action Code
Bytes 1 and 2 contain the SNA sequence number of the last message received by TPF. Bytes 3 and 4 contain the sequence number for the last message TPF sent.
If the sequence numbers are correct, the 3601 simply returns a positive response. Otherwise, the response also includes a 5-byte data field. Figure 7 defines the 3601 action code (byte 0) response.
Figure 7. 3601 Set-and-Test Sequence Numbers Action Code Response
The 3601 places the sequence number of the last message it sent to TPF in bytes 1 and 2, and the number of the last message it received in bytes 3 and 4.
The 3601 response to a TPF STSN command is summarized in Figure 8. The ensuing TPF processing options are summarized in Figure 9.