Version 8.1.4
 —  Command Reference  —

C1 Command: Write a Checkpoint

The C1 command writes the command ID, PLOG, RABN checkpoint, and buffer flush option.

We recommend that you set unused ACB and ACBX fields to binary zeros before the direct call is initiated.

This document covers the following topics:


Function and Use

The C1 command is used to request that a checkpoint be taken.

C1 commands are normally only issued by exclusive control update users (who are not using ET logic) or by users who are operating in single-user mode.

Adabas executes an implied C1 command at the beginning of a user program in which exclusive file control updating has been requested.

The result of the C1 command is a checkpoint entry in the Adabas checkpoint table. This checkpoint entry:

Specifying the "F" (flush buffers) option in the Command Option 1 or Command Option 2 fields forces Adabas to flush the contents of the Adabas buffer pool to external storage at the end of command processing.

Top of page

ACB Interface Direct Call: C1 Command

This section describes ACB interface direct calls for the C1 command. It covers the following topics:

Control Block and Buffer Overview

Control Block

Field Position Format Before Adabas Call After Adabas Call
  1-2 -- -- --
Command Code 3-4 alphanumeric F U
Command ID 5-8 alphanumeric F A
File Number * 9-10 binary F U
Response Code 11-12 binary -- A
  13-34 -- -- --
Command Option 1 35 alphanumeric F U
Command Option 2 36 alphanumeric F U
  37-72 -- -- --
Command Time 73-76 binary -- A
User Area 77-80 -- -- U

Buffer Areas

None used.

where:

F Supplied by user before Adabas call
A Supplied by Adabas
U Unchanged after Adabas call
* A database ID is only necessary if you are accessing a database other than the application's default database (read in by ADARUN DBID parameter, provided in the loaded link globals table, or linked with the link routine).
-- Not used

Control Block Field Descriptions

We recommend that you set unused ACB fields to binary zeros before the direct call is initiated.

Command Code (ACBCMD)

C1

Command ID (ACBCID)

A non-blank, non-zero value must be entered in this field. This value identifies the checkpoint taken. It is not necessary that each value provided for each checkpoint be unique.

A value of "0000" or "SYNC" may not be specified.

The first byte of this field may not be set to hexadecimal 'FF'.

File Number (ACBFNR)

A database ID is only necessary if you are accessing a database other than the application's default database (read in by ADARUN DBID parameter, provided in the loaded link globals table, or linked with the link routine).

Response Code (ACBRSP)

Adabas returns the response code for the command in this field. Response code 0 indicates that the command was executed successfully. If the C1 command returns a non-zero response code, the rightmost two bytes of the Adabas control block, bytes 45-48 (Additions 2 field), may contain a subcode defining the exact response code meaning. Response codes and their subcodes are defined in the Adabas Messages and Codes Manual documentation.

Command Option 1 and Command Option 2: Flush Buffers Option (ACBCOP1 and ACBCOP2)
Option Description
F (flush buffers) Specify this option in either the Command Option1 or Command Option2 field to force Adabas to flush the contents of the Adabas buffer pool to external storage at the end of command processing.

ACB Example

A checkpoint entry is to be written. The checkpoint is to be identified by the value "UCP4".

Control Block

Command Code C1  
Command ID UCP4 checkpoint identifier

Top of page

ACBX Interface Direct Call: C1 Command

This section describes ACBX interface direct calls for the C1 command. It covers the following topics:

Control Block and Buffer Overview

Control Block

Field Position Format Before Adabas Call After Adabas Call
  1-2 --- --- ---
Version Indicator 3-4 binary F U
  5-6 --- --- ---
Command Code 7-8 alphanumeric F U
  9-10 --- --- ---
Response Code 11-12 binary --- A
Command ID 13-16 alphanumeric/ binary F A
Database ID* 17-20 numeric F U
  21-48 --- --- ---
Command Option 1 49 alphanumeric F U
Command Option 2 50 alphanumeric F U
  51-114 --- --- ---
Error Subcode 115-116 binary --- A
  117-144 --- --- ---
Command Time 145-152 binary --- A
User Area 153-168 not applicable --- U
  169-193 --- --- ---

ABDs and Buffers

None used.

where:

F Supplied by user before Adabas call
A Supplied by Adabas
U Unchanged after Adabas call
* A database ID is only necessary if you are accessing a database other than the application's default database (read in by ADARUN DBID parameter, provided in the loaded link globals table, or linked with the link routine).
--- Not used

Control Block Field Descriptions

We recommend that you set unused ACBX fields to binary zeros before the direct call is initiated.

Version Indicator (ACBXVER)

F2

Command Code (ACBXCMD)

C1

Response Code (ACBXRSP)

Adabas returns the response code for the command in this field. Response code 0 indicates that the command was executed successfully. Non-zero response codes, which can also have accompanying subcodes returned in the Error Subcode (ACBXERRC) field, are described in the Adabas Messages and Codes Manual documentation.

Command ID (ACBXCID)

A non-blank, non-zero value must be entered in this field. This value identifies the checkpoint taken. It is not necessary that each value provided for each checkpoint be unique.

A value of "0000" or "SYNC" may not be specified.

The first byte of this field may not be set to hexadecimal 'FF'.

Database ID (ACBXDBID)

Use this field to specify the database ID only if you are accessing a database other than the application's default database (read in by ADARUN DBID parameter, provided in the loaded link globals table, or linked with the link routine). The Adabas call will be directed to this database.

This field is a four-byte binary field, but at this time only two-byte database IDs are supported. Therefore, the database ID should be specified in the low-order part (rightmost bytes) of the field, with leading binary zeros.

If this field is set to binary zeros, the Adabas API uses either the database ID from the ADARUN cards provided in DDCARD input data or the default database ID value provided in the LNKGBLS module linked with or loaded by the link routine.

Command Option 1 and Command Option 2: Flush Buffers Option (ACBXCOP1 and ACBXCOP2)
Option Description
F (flush buffers) Specify this option in either the Command Option 1 or Command Option 2 field to force Adabas to flush the contents of the Adabas buffer pool to external storage at the end of command processing.
Error Subcode (ACBXERRC)

If the command returns a nonzero response code, this field contains a subcode defining the exact response code meaning. Response codes and their subcodes are defined in the Adabas Messages and Codes Manual documentation.

Top of page