COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-36
CHECKPOINT
•
Sending Values to a Backup Process
When CHECKPOINT executes, the values of the data items and file sync blocks
are sent to the fault-tolerant facility in the backup process. If the primary process
fails before another checkpoint is made, the backup begins processing from the
current checkpoint. The set of values specified in any checkpoint must be sufficient
for the backup process to continue processing correctly with only that information.
After the CHECKPOINT statement transfers the information in the checkpoint list to
the backup process, it resets the checkpoint list to empty and its storage space is
available to record further message changes.
•
Multiple Checkpoints for a Transaction
Use multiple checkpoints for a transaction if the number of WRITE statements
executed for a file exceeds the value of the sync depth with which the file was
opened. If a file was opened with sync depth n, use at least one CHECKPOINT for
every n WRITE statements executed for a file.
•
CHECKPOINT for Process Pairs
When a requester that is running as a process pair sends a message, and the
backup process takes over before the requester receives a reply, the server can
resend the reply automatically—if a CHECKPOINT statement executes after the
server reads the requester’s message but before the server writes a reply (or
generates one automatically with another READ). When this happens, the server
does not see the duplicate message. The CHECKPOINT statement can execute
even if the server is not running as a process pair.
•
A Process Pair Cannot Update an SQL/MP or SQL/MX Database
An HP COBOL program that runs as a process pair cannot update an SQL/MP or
SQL/MX database.
Note. A COBOL program must not modify the contents of a checkpoint list directly. The
execution logic of the routines and the CHECKPOINT statement maintain checkpoint lists
without the need for any other program action.