E1 Command: Delete Record / Refresh File

#### Search Results

Search

# E1 Command: Delete Record / Refresh File

The E1 command deletes a record with the hold option, or refreshes a file.

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

- ACB Interface Direct Call: E1 Command

- ACBX Interface Direct Call: E1 Command

## Function and Use

The E1 command deletes a record when the record's ISN is specified, or refreshes a file when an ISN value of zero is specified.

You must specify the file number and ISN of the record to be deleted. Adabas deletes the record from Data Storage. If no ISN is specified and the command ID field contains no command ID (that is, is set to spaces) and the specified file was last loaded with the ADALOD parameter PGMREFRESH=YES, the E1 command refreshes the specified file by first deleting all records of the file and reducing the Associator and Data Storage components of the file to a single extent.

Whether deleting a record or refreshing the entire file, the E1 command also makes the necessary changes to the Associator. You cannot perform both a delete record and file refresh in the same E1 command operation.

If the user is operating in multiuser mode and the record to be deleted is not in hold status for the user, Adabas will place the record in hold status for the user. If the record is in hold status for another user, the E1 command is placed in wait status until the record becomes available. If the R option is specified in the Command Option 1 field and the requested record is not available, response code 145 (ADARSP145) is returned.

Note
The E4 command supported in earlier Adabas releases is executed as an E1 command.

## ACB Interface Direct Call: E1 Command

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

- Control Block and Buffer Overview

- Control Block Field Descriptions

- ACB Examples

### 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 / binary | F | U
File Number | 9-10 | binary | F | U
Response Code | 11-12 | binary | -- | A
ISN | 13-16 | binary | F | U
ISN Lower Limit | 17-20 | binary | -- | A1
ISN Quantity | 21-24 | binary | -- | A1
| 25-34 | -- | -- | --
Command Option 1 | 35 | alphanumeric | F | U
| 36-48 | -- | -- | --
Additions 3 | 49-56 | alphanumeric | F | A
Additions 4 | 57-64 | alphanumeric | F | A
| 65-72 | -- | -- | --
Command Time | 73-76 | binary | -- | A
User Area | 77-80 | -- | -- | U

#### Notes

1. These fields are used and not reset by Adabas if coupled files are used.

#### Buffer Areas

None used.

where:

F | Supplied by user before Adabas call
A | Supplied by Adabas
U | Unchanged after Adabas call
-- | 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)

>   E1

> Command ID (ACBCID)

>   To refresh a file, set this field to blanks and the ISN field to zero. If you set this field to any other value while specifying an ISN field of zero, the E1 command attempts to remove the record for ISN 0 from the specified file, which causes response code 114 (ADARSP114).

> File Number (ACBFNR)

>   Specify the binary number of the file to be read in this field. For physical direct calls, specify the file number as follows:

>   - For a one-byte file number, enter the file number in the rightmost byte (10); the leftmost byte (9), should be set to binary zero (B'0000 0000').

>   - For a two-byte file number, use both bytes (9 and 10) of the field.

>   Note
>   When using two-byte file numbers and database IDs, a X'30' must be coded in the first byte of the control block.

> 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 E1 command returns a nonzero response code, the rightmost two bytes of the Adabas control block Additions 2 field, bytes 47 and 48, 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.

> ISN (ACBISN)

>   The ISN of the record to be deleted. If the command ID field contains blanks and this field contains zero, the file specified by the file number field is refreshed. If the command ID field contains non-blanks and this field contains zero, a response code 114 (ADARSP114) occurs.

> ISN Quantity/Lower Limit (ACBISQ and ACBISL)

>   These fields are set to nulls following completion of the E1 command operation only if hard-coupled files are not used. If coupled files are used, these fields are used for E1 command processing and are not reset.

> Command Option 1: Response Code 145 (ADARSP145) if Record not Available (ACBCOP1)

>   If the user is an ET logic user and the record to be deleted is not in hold status for the user, Adabas places the record in hold status for the user. If the record to be deleted is being held by another user, the action taken by Adabas is controlled by the setting of the Command Option 1 field:

>   Option | Description
>   --- | ---
>   R (return) | Causes Adabas to return response code 145 (ADARSP145) if the record to be deleted is not available. The command is not placed in wait status.

>   Otherwise, Adabas places the E1 command in wait status until either the record becomes available or the transaction times out.

> Additions 3: Password (ACBADD3)

>   This field is used to provide an Adabas security password. If the database, file, or fields are security-protected, the user must provide a valid security password. Adabas sets the Additions 3 field to blanks during command processing to enhance password integrity.

> Additions 4: Cipher Code (ACBADD4)

>   This field is used to provide a cipher code. If the file is ciphered, the user must provide a valid cipher code. If the file is not ciphered, this field should be set to blanks.

>   Adabas sets any cipher code to blanks during command processing, and returns a version code and database ID in the rightmost (low-order) three bytes of this field. For more information, see the section Control Block Fields.

### ACB Examples

- Example 1
- Example 2

#### Example 1

ISN 4 in file 2 is to be deleted.

#### Control Block

Command Code | E1 |
File Number | 2 | record to be deleted is in file 2
ISN | 4 | record with ISN 4 to be deleted
Additions 3 | password | file 2 is security-protected

#### Example 2

The file specified in the file field (4) is to be refreshed

#### Control Block

Command Code | E1 |
File Number | 4 | refresh file 4
ISN |  | set to binary zero
Command ID | bbbb | set to blanks

The E1 command refreshes file 4.

## ACBX Interface Direct Call: E1 Command

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

- Control Block and Buffer Overview

- Control Block Field Descriptions

### 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 | U
Database ID | 17-20 | numeric | F | U
File Number | 21-24 | numeric | F | U
| 25-28 |  | --- | ---
ISN | 29-32 | binary | F | U
| 33-36 |  | --- | ---
ISN Lower Limit | 37-40 | binary | --- | A1
| 41-44 |  | --- | ---
ISN Quantity | 45-48 | binary | --- | A1
Command Option 1 | 49 | alphanumeric | F | U
| 50-68 | --- | --- | ---
Additions 3 | 69-76 | alphanumeric/ binary | F | A
Additions 4 | 77-84 | alphanumeric | F | A
| 85-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 | --- | ---

#### Notes

1. These fields are used and not reset by Adabas if coupled files are used.

#### ABDs and Buffers

None used.

where:

F | Supplied by user before Adabas call
A | Supplied by Adabas
U | Unchanged after Adabas call
--- | 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)

>   E1

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

> Command ID (ACBXCID)

>   To refresh a file, set this field to blanks and the ISN field to zero. If you set this field to any other value while specifying an ISN field of zero, the E1 command attempts to remove the record for ISN 0 from the specified file, which causes response code 114 (ADARSP114).

> Database ID (ACBXDBID)

>   Use this field to specify the database ID. 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)

>   Use this field to specify the number of the file to which the Adabas call should be directed.

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

> ISN (ACBXISL)

>   The ISN of the record to be deleted. If the command ID field contains blanks and this field contains zero, the file specified by the file number field is refreshed. If the command ID field contains non-blanks and this field contains zero, a response code 114 (ADARSP114) occurs.

>   The ACBXISL field is a four-byte binary field embedded in the eight-byte ACBXISLG field, which is not yet used. Set the high-order part of the ACBXISLG field to binary zeros.

>   This field is set to nulls following completion of the E1 command operation, unless hard-coupled files are used. If coupled files are used, this field is used for E1 command processing and is not reset.

> ISN Quantity (ACBXISQ)

>   This field is set to nulls following completion of the E1 command operation, unless hard-coupled files are used. If coupled files are used, this field is used for E1 command processing and is not reset.

> Command Option 1: Response Code 145 (ADARSP145) if Record not Available (ACBXCOP1)

>   If the user is an ET logic user and the record to be deleted is not in hold status for the user, Adabas places the record in hold status for the user. If the record to be deleted is being held by another user, the action taken by Adabas is controlled by the setting of the Command Option 1 field:

>   Option | Description
>   --- | ---
>   R (return) | Causes Adabas to return response code 145 (ADARSP145) if the record to be deleted is not available. The command is not placed in wait status.

>   Otherwise, Adabas places the E1 command in wait status until either the record becomes available or the transaction times out.

> Additions 3: Password (ACBXADD3)

>   This field is used to provide an Adabas security password. If the database, file, or fields are security-protected, the user must provide a valid security password. Adabas sets the Additions 3 field to blanks during command processing to enhance password integrity.

> Additions 4: Cipher Code (ACBXADD4)

>   This field is used to provide a cipher code. If the file is ciphered, the user must provide a valid cipher code. If the file is not ciphered, this field should be set to blanks.

>   Adabas sets any cipher code to blanks during command processing, and returns a version code and database ID in the rightmost (low-order) three bytes of this field. For more information, see the section Control Block Fields.

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

### On this page

- Function and Use
- ACB Interface Direct Call: E1 Command
- ACBX Interface Direct Call: E1 Command