Version 8.2.5
 —  Command Reference  —

C5 Command: Write User Data to Protection Log

The C5 command writes user data on SIBA/PLOG . If you have Event Replicator for Adabas installed, however, you can also use the C5 command to send messages from the originating application to one or more Event Replicator Server destinations. For more information on this Event Replicator for Adabas functionality, read your Event Replicator for Adabas documentation.

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 C5 command is used to write user data to the Adabas data protection log. This data may be read and displayed using the ADASEL utility. The data that is written has no effect on Adabas recovery processing. The ADASAV and ADARES utilities ignore all data written to the data protection log as a result of a C5 command.

Top of page

ACB Interface Direct Call: C5 Command

This section describes ACB interface direct calls for the C5 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
  5-8 -- -- --
File Number ** 9-10 binary F U
Response Code 11-12 binary -- A
  13-26 -- -- --
Record Buffer Length 27-28 binary F U
  29-34 -- -- --
Command Option 1*** 35 alphanumeric F U
  36 -- -- --
Additions 1*** 37-44 alphanumeric F U
  45-72 -- -- --
Command Time 73-76 binary -- A
User Area 77-80 -- -- U

Buffer Areas

Buffer Before Adabas Call After Adabas Call
Format *  
Record F U

where:

F Supplied by user before Adabas call
A Supplied by Adabas
U Unchanged after Adabas call
* Not used but must be included in parameter list of call statement
** 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).

However, if you are using Event Replicator for Adabas and the Command Option 1 field is set to "R", a file number must be specified to identify the file to which the C5 command applies. For more information, read your Event Replicator for Adabas documentation.

*** Only used if you are using Event Replicator for Adabas. For more information, read your Event Replicator for Adabas documentation.
-- 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)

C5

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).

However, if you are using Event Replicator for Adabas and the Command Option 1 field is set to "R", a file number must be specified to identify the file to which the C5 command applies. For more information, read your Event Replicator for Adabas documentation.

Response Code (ACBRSP)

Adabas returns the response code for the command in this field. Response code 0 (ADARSP000) indicates that the command was executed successfully. If the C5 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.

Record Buffer Length (ACBRBL)

The number of bytes specified in this field will be written to the Adabas data protection log.

The maximum length which may be specified is 2048 bytes.

Command Option 1 (ACBCOP1)

Used only if you are using the Event Replicator for Adabas. Otherwise, this field must be blank. For more information, read your Event Replicator for Adabas documentation.

Additions 1 (ACBADD1)

Used only if you are using the Event Replicator for Adabas. For more information, read your Event Replicator for Adabas documentation.

ACB Example

The information "ULRR0422 UPDATES FOR JANUARY" is to be written to the Adabas data protection log.

Control Block

Command Code C5
Record Buffer Length 28

Buffer Areas

Record Buffer ULRR0422 UPDATES FOR JANUARY

Top of page

ACBX Interface Direct Call: C5 Command

This section describes ACBX interface direct calls for the C5 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
  13-16 --- --- ---
Database ID** 17-20 numeric F U
File Number*** 21-24 numeric F U
  25-48 --- --- ---
Command Option 1*** 49 alphanumeric F U
  50-56 --- --- ---
Additions 1*** 57-64 alphanumeric/ binary F U
  65-114 --- --- ---
Error Subcode 115-116 binary --- A
  117-144 --- --- ---
Command Time 145-152 binary --- A
User Area 153-168 not applicable --- U
--- 169-193 do not touch --- ---

ABDs and Buffers

ABD and Buffer Before Adabas Call After Adabas Call
Format *  
Record F U

where:

F Supplied by user before Adabas call
A Supplied by Adabas
U Unchanged after Adabas call
* Not used but should be included in Adabas call or one will be automatically generated.
** 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).

However, if you are using Event Replicator for Adabas and the Command Option 1 field is set to "R", a file number must be specified to identify the file to which the C5 command applies. For more information, read your Event Replicator for Adabas documentation.

*** Only used if you are using Event Replicator for Adabas. For more information, read your Event Replicator for Adabas documentation.
--- 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)

C5

Response Code (ACBXRSP)

Adabas returns the response code for the command in this field. Response code 0 (ADARSP000) 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.

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.

File Number (ACBXFNR)

If you are using Event Replicator for Adabas and the Command Option 2 field is set to "R", use this field to specify the number of the file to which the C5 command should be directed. For more information, read your Event Replicator for Adabas documentation.

This field is a four-byte binary field, but the file number should be specified in the low-order part (rightmost bytes) of the field, with leading binary zeros.

Command Option 1 (ACBXCOP1)

Used only if you are using the Event Replicator for Adabas. Otherwise, this field must be blank. For more information, read your Event Replicator for Adabas documentation.

Additions 1 (ACBXADD1)

Used only if you are using the Event Replicator for Adabas. For more information, read your Event Replicator for Adabas documentation.

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

Buffers

The following buffers apply to a C5 command:

Format Buffer

A format buffer is not used by the C5 command, but should be included in the Adabas call. If this is an ACB interface direct call and a format buffer is not specified, a processing error will occur; ACB interface direct calls expect buffers to be specified in a set sequence. If this is an ACBX interface direct call and a format buffer is not specified, one will be automatically generated.

Record Buffer

The information to be written to the data protection log is provided in this buffer.

The information written may be selected subsequently using the ADASEL utility by specifying the beginning characters (1 to 30 characters) as originally contained in the record buffer. It is, therefore, recommended that you provide a unique identification of your data in the beginning positions of the record buffer. This will ensure that the data can be properly identified and selected.

Top of page