COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Debugging Programs That Use the Fault-Tolerant Facility
Debugging a program that uses the fault-tolerant facility requires at least as careful an analysis as
designing the program. This list of suggestions is not exhaustive.
• Test the program thoroughly as a simple batch job. You might create files of transactions that
the job must successfully process before you try testing the fault-tolerance mechanisms. You
can have the program read the files instead of having the program read from $RECEIVE.
• You can compile your program with STARTBACKUP and CHECKPOINT statements in place,
but disable them for batch testing by running the program with the run-time parameter
NONSTOP OFF. With NONSTOP OFF, the program does not attempt to execute the
STARTBACKUP and CHECKPOINT statements. To establish the run-time parameter, use the
TACL command PARAM (or the SMU routine SMU_Param_PutText_ if you use a COBOL
process to start your batch test programs).
• When you are convinced that the program works without being fault tolerant, start testing the
fault tolerance. Execute the program as a process pair, and use a symbolic debugger to set
breakpoints at which you stop the primary process. You can set different breakpoints in the
primary and backup processes to determine whether the backup process takes over properly.
• When all controlled testing is complete, obtain the use of a dedicated system and try full
integrated testing in which you run the application as a process pair and stop one of the two
processors on which the application is running.
TMF
TMF simplifies the task of maintaining data consistency for distributed databases that are being
updated by several independent processes.
TMF was developed to help solve two problems faced by designers of database processing
applications:
• What happens if a transaction starts to change a database and fails to complete all of its
changes?
• How can a database be recovered after a catastrophic, multicomponent system failure?
Before TMF was available, the answer to the first question was to write application code to back
out partial transactions and restore the affected parts of the database to the condition they were
in when the failed transaction began. Further, this application code had to be fault tolerant to
overcome possible single points of failure.
The answer to question two was to stop the system periodically and make tape or disk backups.
Then if a catastrophic failure occurred, you could restore the database from the tape or disk and
redo the transactions that had been done since the backup. This required considerable design and
coding effort, particularly if you had to do it for several applications.
TMF has packaged the solution to these two questions of backout and recovery. TMF automatically
backs out incomplete transactions and provides a mechanism for periodically taking online dumps
and a roll-forward procedure to automate the repetition of post-backup transactions.
Concepts
The basic concepts of TMF are:
• Transactions in General
• Multiple-File Transactions
• Multiple Changes to a Single File
• Defining Transactions
• Audit Trails
TMF 953










