COBOL Manual for TNS/E Programs (H06.03+)
Fault-Tolerant Processes
HP COBOL Manual for TNS/E Programs—520347-003
32-11
Using the Fault-Tolerant Facility
If option 3 of the STARTBACKUP statement is specified (that is, if your program
monitors the backup process), then the possible values of PROGRAM-STATUS are as
shown in Table 32-2.
If the primary process fails and a proper takeover occurs, PROGRAM-STATUS is set to
a take-over status values (such as “01nn ”) when the backup process begins
executing. Successive checkpoints set PROGRAM-STATUS to other values (such as
“1000”).
The action your program should take in response to an exception status (a status other
than “0000”) depends upon your application and the location of the error in your
HP COBOL program. A takeover might need special processing. Most of the other
status values indicate a program coding problem or a system configuration problem.
Report the latter problem to the appropriate authority for your system.
How far and whether processing should continue following a nontakeover status is a
subject for careful analysis.
If a checkpoint failure occurs (that is, status “1000”, “2nnn ”, or “3nnn ”), the backup
process might remain in an invalid state; therefore, the HP COBOL fault-tolerant facility
stops the backup process if such a failure occurs. If the STARTBACKUP option 0, 1, or
2 was specified (signifying that the HP COBOL fault-tolerant facility is to monitor the
backup process), the facility tries to restart the backup process at the next execution of
the CHECKPOINT statement.
If the checkpoint failure persists for 10 restart cycles, the HP COBOL fault-tolerant
facility stops reestablishing a backup process and sets PROGRAM-STATUS to “5000.”
4nnn Indicates a PROCESS_CREATE_ failure. For more information, see
the Guardian Procedure Calls Reference Manual.
5000 Too many failure-restart cycles (takeovers by backup) or a logic
error in program
6000 Parameter or logic error
Table 32-2. Values for PROGRAM-STATUS When STARTBACKUP Has Option 3
Statement
First Digit of PROGRAM-STATUS
0 123456
STARTBACKUP Yes Yes Yes Yes Yes No Yes
CHECKPOINT Yes Yes Yes No No No Yes
OPEN Yes Yes Yes Yes No No No
CLOSE Yes Yes Yes No No No No
Table 32-1. Values for PROGRAM-STATUS
When STARTBACKUP Has Option 0, 1, or 2 (page 2 of 2)
PROGRAM-STATUS
Value Meaning










