TMF Introduction (G06.26+)

Transaction Coordination
HP NonStop TMF Introduction522414-002
2-6
Transaction Identification
Transaction Identification
As discussed in Section 1, TMF Overview, an application commonly makes a series of
changes to a database and transforms the database from one state to another. During
the transformation, some of the intermediate states of the database fail to satisfy one
or more application consistency rules.
To solve this problem, a TMF transaction is defined as a group of changes to a
database that transform the database from one consistent state to another (despite the
fact that individual changes usually make the database inconsistent). This group of
changes, then, is logically defined in an application by the transaction’s collective
beginning and end.
When an application initiates a transaction, TMF associates that transaction with a
unique identifier. As TMF manipulates the transaction, it associates that unique
identifier with each of the individual changes that make up the transaction.
Transaction Definition by the Application
Programmers define TMF transactions by designating the operations for the logical
work of the transaction. The application specifies the logical work of the transaction;
TMF makes all the complex processing involved in transaction control transparent to
the programmer. The transaction control statements and the response of TMF are
described next.
In the Pathway environment, transaction control typically occurs in a requester
program, as illustrated in Figure 2-4.
The requester, which is a SCREEN COBOL program, uses these transaction control
statements: BEGIN-TRANSACTION, END-TRANSACTION, and ABORT-
TRANSACTION.
The server program accesses the database on behalf of the requester program.
Servers typically include abort-transaction statements for error handling if they need to
undo a transaction. Servers are coded in C, C++, HP COBOL, FORTRAN, or TAL; they
can also use SQL statements embedded within most of those languages.