Pathway/iTS TCP and Terminal Programming Guide

Managing Transactions With the TMF Subsystem
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide426751-001
5-7
SCREEN COBOL Special Registers for the TMF
Subsystem
IF RESTART-COUNTER > 2
ABORT-TRANSACTION
DISPLAY "No" IN MSG
MOVE 1 TO abort-flag.
END-TRANSACTION Use
The END-TRANSACTION statement indicates that the transaction is complete. When
this statement is successfully executed, the database updates made by the transaction
become permanent, the terminal leaves transaction mode, and the special register
TRANSACTION-ID is set to SPACES.
If the TMF subsystem rejects END-TRANSACTION, the SCREEN COBOL program is
restarted at the previous BEGIN-TRANSACTION point.
The form of the END-TRANSACTION statement is:
If the terminal is not in transaction mode when END-TRANSACTION is executed, it is
suspended; in such a case terminal execution cannot be resumed with a RESUME
command.
RESTART-TRANSACTION Use
The RESTART-TRANSACTION statement is used when the SCREEN COBOL
program detects an error that might be temporary, abandons the current attempt, and
retries the transaction. When this statement is executed, the following occurs:
The current execution of the transaction is backed out.
The transaction is restarted at the previous BEGIN-TRANSACTION point with a
new transaction identifier.
The special register RESTART-COUNTER is incremented by 1.
The form of the RESTART-TRANSACTION statement is:
The restart due to executing RESTART-TRANSACTION counts as a restart for
purposes of the global transaction-restart limit.
If the terminal is not in transaction mode when RESTART-TRANSACTION is
executed, the terminal is suspended; in such a case terminal execution cannot be
resumed with a PATHCOM or SPI RESUME command.
SCREEN COBOL Special Registers for the TMF Subsystem
Special registers are data items defined automatically by the SCREEN COBOL
compiler, not by the programmer. Three special registers have been provided for TMF
subsystem users: TRANSACTION-ID, TERMINATION-STATUS, and
RESTART-COUNTER.
END-TRANSACTION
RESTART-TRANSACTION