COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
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.
CLOSE
CLOSE terminates processing of one or more open files or reels of tape. An optional LOCK phrase
prevents the program from reopening the file (unless the file is dynamically assignable—see
#DYNAMIC (page 835)).
If a file is closed but not locked, the only I-O operation the process can perform on that file is an
open operation. If the file is closed and locked, the process cannot perform any I-O operation on
the file.
CLOSE has these formats:
• CLOSE for Sequential and Line Sequential Files
• CLOSE for Relative, Indexed, and Queue Files
CLOSE for Sequential and Line Sequential Files
Throughout this topic, “sequential file” means both sequential and line sequential files unless
otherwise noted.
304 Procedure Division Verbs










