COBOL Manual for TNS and TNS/R Programs
Fault-Tolerant Processes
HP COBOL Manual for TNS and TNS/R Programs—522555-006
32-2
NonStop Operating System
NonStop Operating System
The NonStop operating system architecture is the underlying mechanism that enables
you to write fault-tolerant processes. The full redundancy of processors, devices,
controllers, and paths among them is the basis for the NonStop operating system’s
fault tolerance. But given that base, there are still two ways a process (particularly a
Pathway server process operating under TS/MP) can be designed to be fault tolerant:
by using the fault-tolerant facility or by using TMF.
Topics:
•
Introduction to the Fault-Tolerant Facility
•
Introduction to TMF
•
Choosing the Fault-Tolerant Facility or TMF
When you have decided which of the two mechanisms to use, you can read more
about it in Fault-Tolerant Facility or TMF.
Introduction to the Fault-Tolerant Facility
To use the fault-tolerant facility, you must include the NONSTOP compiler directive in
your compilation and embed one STARTBACKUP statement and one or more
CHECKPOINT statements at strategic points in your program.
At the beginning of its execution, after opening its files, your process executes a
STARTBACKUP statement to instruct the operating environment to produce a backup
process in a different processor and to open the same files in the backup process. The
backup process is loaded from the same loadfile as the original (primary) process, but
the operating environment does not actually start it running.
At certain points in your program, you code CHECKPOINT statements, which instruct
the operating environment to copy a specific list of one or more of your data elements
into the backup process’s data space. If the primary process fails, the operating
environment activates the backup process. The backup process starts executing at the
code location following the last CHECKPOINT statement executed. At this point, the
backup process’s data space contains a copy of the part of the primary process’s data
space that was checkpointed at the time of the last CHECKPOINT statement.
Determining the proper sites and data-element lists for CHECKPOINT statements can
be a painstaking operation. One recommendation is that you checkpoint everything
involved in writing a record just before executing the WRITE statement.
Note. This topic does not apply to the OSS environment. It applies to the NMCOBOL compiler
only for RVU D46.00 and G06.00 or later, software product revision T8107AAT (run-time library
T8108AAR).