TRANSFER Programming Manual

Planning High-Level Transactions
Developing TRANSFER Applications
40970 Tandem Computers Incorporated 8–11
Planning High-Level
Transactions
A TRANSFER transaction typically consists of several TMF transactions, possibly in
different PATHWAY systems. Often, separate TMF transactions are required for the
following operations:
Build and send the package
Deliver the package
Respond to the package, such as placing it in a folder on the receiving end
Produce and send replies
Deliver the replies
React to the replies
All of these transactions, except the ones involving package delivery, are in the
domain of application requesters and agents.
For simple applications, it is generally sufficient to:
Start a TMF transaction immediately after completion of a terminal read for any
request that requires a transaction.
End this TMF transaction immediately before the next terminal read.
For more complex applications, the basic guidelines for establishing TMF transactions
in all programs apply to clients and agents. These guidelines include the following:
If your request does not change files on disk, you do not need a TMF transaction.
TMF transactions are designed to guarantee that either all or none of the changes
in a single transaction are stored in the database. Therefore, organize your
transactions into groups of updates that are interrelated.
Multiple TMF transactions can significantly impact program execution time;
therefore, consider performing all of the work for each request within a single
TMF transaction, even if your application does not require the guarantee that
either all or none of the individual operations will be completed.
The size of your transaction can influence performance. Use multiple TMF
transactions per user request if the request will take a very long time or if it
involves updates to hundreds of records in the database.
Changes requested in a TMF transaction are not reflected in the database until the
TMF transaction ends; therefore, applications should not leave a TMF transaction
active while waiting for a user to press a function key or react to a prompt. The
record locks involved in such a transaction might be held for a very long time,
delaying access by other users. Also, if the user leaves the terminal with a TMF
transaction still in progress and an error occurs, TMF audit trails on disk cannot be
purged.