COBOL Manual for TNS/E Programs (H06.03+)

Procedure Division Verbs
HP COBOL Manual for TNS/E Programs520347-003
9-241
STARTBACKUP
Backup Process and Takeover Points
When the process is qualified to execute as a process pair, successful execution of
the STARTBACKUP statement establishes and initializes a backup process. The
STARTBACKUP statement does not itself establish a valid takeover point; this is a
function of the CHECKPOINT, OPEN, or CLOSE statement.
Code a CHECKPOINT statement after each STARTBACKUP statement so that the
new backup process will have all the data it needs for a possible takeover.
Creation and Maintenance of a Backup Process
Execution of the STARTBACKUP statement assigns a value to the special register
PROGRAM-STATUS, reflecting the success or failure of the creation of the backup
process. PROGRAM-STATUS is a record with two fields, PROGRAM-STATUS-1
and PROGRAM-STATUS-2:
01 PROGRAM-STATUS.
02 PROGRAM-STATUS-1 PIC X.
02 PROGRAM-STATUS-2 PIC XXX.
Automatic backup process maintenance (for levels below 3) does not take effect
until after the successful execution of a STARTBACKUP statement.
For PROGRAM-STATUS values, see Table 32-1 and Table 32-2.
Unnamed Processes
If the process to which the STARTBACKUP statement applies was not initiated as
a named process (that is, with the NAME option of the RUN command), the
STARTBACKUP statement returns a specific value in the special register
PROGRAM-STATUS. In the CRE, the value is 4922; in the non-CRE environment,
it is 4013.
STARTBACKUP Options
For most applications, use option 0 or 1. For either of these options, a
STARTBACKUP statement must execute once during the initialization phase of the
program (check the outcome of the STARTBACKUP execution by examining the
PROGRAM-STATUS variable). At each successive checkpoint, the fault-tolerant
facility checks the state of the backup process and processor. If the backup
process is inoperable, the fault-tolerant facility re-creates the backup process. If
the backup’s processor is operable, the fault-tolerant facility re-creates the backup
process immediately. If the backup’s processor is inoperable, the fault-tolerant
facility re-creates the backup process when backup’s processor becomes
operable.