Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Writing checkpoints (CHECKPOINT)

&pagelevel(4)&pagelevel

CHECKPOINT[ DB=dbname[,OPTION=EVEN-WITHOUT-ALOG]]          

dbname Name of the database for which a checkpoint is to be written.

CHECKPOINT
(without DB)

Checkpoints are to be written for all databases in the configuration.

OPTION=EVEN-WITHOUT-ALOG

A checkpoint is also written on the dbname database if it is operated without AFIM logging. If OPTION=EVEN-WITHOUT-ALOG is not specified, the CHECKPOINT command is rejected for such databases. Specification of OPTION=EVEN-WITHOUT-ALOG has no effect for databases with AFIM logging.

The CHECKPOINT command is used to issue a request to write a checkpoint. To write checkpoints the DBH closes the ALOG file for each database and then opens a new ALOG file. The request is not executed until a PERFORM command is issued.

All RETRIEVAL transactions, including any newly initiated ones, continue without interruption. All current UPDATE transactions are completed. With COBOL DML, generally all UPDATE transactions initiated while checkpoints are being written are rejected with status code 12122. This status code can be influenced using PP ORDER-DBSTATUS.

New SQL transactions can execute as RETRIEVAL transactions. UPDATE statements are rejected (SQL CODE -810).

A CHECKPOINT command is rejected if AFIM logging is activated for the databases involved and the databases were attached with the SHARED-RETRIEVAL option.

The CHECKPOINT command can also be issued for a database which is not yet attached to the DB configuration but has been specified in a request for database attachment. This is advisable in order to ensure that checkpoints can be written even for databases which are attached by means of the DAL command ADD DB. The DBH load parameter PP STDCKPT is not applicable to dynamic attachment and detachment of databases.

The DBH can open a new ALOG file only if the file was created previously by means of the CREATE-FILE command or if the database resides under the configuration user ID.

If the DBH cannot make a new ALOG file ready for use, it internally locks the affected database against being accessed for updating (UPDATE), i.e. it permits access only for reading.
This lock cannot be removed by the database administrator by means of the DAL command ACCESS UPDATE.

However, the database administrator can generate (a new version of) the missing ALOG file using the CREATE-FILE command and enter another CHECKPOINT command and another PERFORM for the database, thereby releasing the internal UPDATE lock. See also "Switching the ALOG file" and "ALOG file overflow"on page 127.

If a CHECKPOINT request is executed without specifying DB=dbname and databases are attached to the configuration for which no AFIM logging is activated, a message will be issued for each of these databases indicating that no checkpoint was written.


Responses in error situations

The CHECKPOINT command is rejected if

  • the database is run with OPTION=SHARED-RETRIEVAL.

  • no database with the given name exists and no request to attach a database with that name is pending.

  • a database with the given name does exist but is run without AFIM logging, and OPTION=EVEN-WITHOUT-ALOG is also not specified.