Pathway/iTS TCP and Terminal Programming Guide
Managing Transactions With the TMF Subsystem
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide—426751-001
5-5
SCREEN COBOL Verbs for the TMF Subsystem
You should include an ON ERROR clause in each BEGIN-TRANSACTION statement
and provide coding to check for file-system errors that could occur on any of the
transaction statements. Failure to perform these checks could cause important parts of
your application to fail. For a list of the file-system errors that can be returned by the
TMF procedure calls corresponding to these transaction statements, refer to the
NonStop™ TM/MP Application Programmer’s Guide.
ABORT-TRANSACTION Use
Generally the ABORT-TRANSACTION statement is used when the SCREEN COBOL
program detects an unrecoverable error and abandons the transaction. When this
statement is executed, the transaction is aborted; all updates made by the transaction to
audited data files are backed out. The aborted transaction is not restarted automatically.
The form of the ABORT-TRANSACTION statement is:
Execution of the ABORT-TRANSACTION statement causes the terminal to leave
transaction mode and sets the special register TRANSACTION-ID to SPACES.
If the terminal is not in transaction mode when ABORT-TRANSACTION is executed, it
is suspended; in such a case terminal execution cannot be restarted with a PATHCOM
or SPI RESUME command.
If a fatal error occurs while the transaction is being aborted and the current BEGIN-
TRANSACTION statement does not have an ON ERROR clause, the terminal is
suspended; in such a case the current transaction is backed out and terminal execution
cannot be resumed with a RESUME command. If the BEGIN-TRANSACTION
statement has an ON ERROR clause, that clause is executed and the terminal is not
suspended.
BEGIN-TRANSACTION Use
The BEGIN-TRANSACTION statement begins a new transaction; this statement
identifies the beginning of a sequence of operations that are treated by the TMF
subsystem as a single transaction. When this statement is executed, the following
occurs:
•
The terminal enters transaction mode.
•
The TMF subsystem is requested to begin a new transaction.
•
The transaction identifier for the new transaction is assigned to the
TRANSACTION-ID special register.
•
RESTART-COUNTER and TERMINATION-STATUS special registers are reset to
0 for the first occurrence of the transaction.
The form of the BEGIN-TRANSACTION statement is:
ABORT-TRANSACTION
BEGIN-TRANSACTION [ ON ERROR imperative-statement ]