This document covers the following topics:
The E1 command is used to delete a record.
The user specifies the file number and ISN of the record to be deleted. Adabas deletes the record from Data Storage and makes any necessary updates to the Associator.
If the user is an ET user 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 will be suspended until the record becomes available, unless the return option is used, in which case response code 145 is returned.
The user can also position to a record via an ADAM (Adabas direct access method) key. In this case, the command option 2 must be set to V, and the search and value buffers must contain the ADAM descriptor name and the ADAM key respectively. If this method is used, the ISN field in the control block becomes an output field.
The E1 command can also be used to refresh a file - refreshing a file resets it to a state of zero records loaded. If a file is to be refreshed, the ISN field in the control block must be set to zero, and the command ID field must be blank.
Field | Format | |
---|---|---|
Call Type | B | F/U |
Reserved (internal use) | -/- | |
Command Code | A | F/U |
Command ID | B | F/U |
File Number | B | F/U (1) |
Response Code | B | F/A (1) |
ISN | B | F/U |
Search Buffer Length (ACB only) | B | F/U |
Value Buffer Length (ACB only) | B | F/U |
Command Option 1 | A | F/U |
Command Option 2 | A | F/U |
Additions 2 | A,B | -/A |
Additions 3 | A | F/A |
Command Time | B | -/A |
User Area | F/U |
Buffer | |
---|---|
Format Buffer | –/– |
Record Buffer | –/– |
Search Buffer | F/U (2) |
Value Buffer | F/U (2) |
ISN Buffer | –/– |
- Formats:
A alphanumeric B binary - x/y before/after Adabas call - x and y can take the values:
A Filled in by Adabas F To be filled in by User U Unchanged after Adabas call - Not used (1) The meaning of this field depends on the value specified for "Call Type". See Calling Adabas, The Control Block for details.
(2) Only required if the V option is used
- Command Code
E1
- Command ID
The command ID must be set to blanks if a file is to be refreshed.
- File Number
The number of the file which contains the record to be deleted.
- Response Code
Adabas returns the response code for the command in this field. Response code 0 indicates that the command was executed successfully.
- ISN
The ISN of the record to be deleted.
If the ADAM option is used, Adabas returns the ISN of the record deleted.
If the file is to be refreshed (reset to a state of zero records loaded), this field must be set to zero.
- Search Buffer Length (ACB only)
The search buffer length (in bytes). The search buffer area defined in the user program must be as large as (or larger than) the length specified.
- Value Buffer Length (ACB only)
The value buffer length (in bytes). The value buffer area defined in the user program must be as large as (or larger than) the length specified.
- Command Option 1
An 'R' in this field indicates that the return option is to be used. If an E1 command is issued, and the record to be deleted is currently held by another user, Adabas will return response code 145 rather than placing the user in wait status until the record becomes available.
- Command Option 2
A 'V' in this field indicates that the ADAM option is being used. A value (the ADAM key) can only be supplied for ADAM descriptor files. The value for the key is given in the value buffer, and the descriptor name is specified in the search buffer. If the ADAM option is used, the ISN field becomes an output field.
Response code 52 is returned if no record with the specified ADAM key is found.
- Additions 2
For some response codes, Adabas returns detailed information in this field. to the Adabas Messages and Codes for further information.
- Additions 3
This field is used to provide a security password.
If the file to be used is not security protected, this field should be set to blanks. If the file is security protected, the user must provide a valid password.
Adabas sets this field to blanks during command processing to protect the integrity of any password provided.
If the ADAM option (command option 2 = V) is used, the search buffer contains the field specification of the ADAM descriptor. A response 61 is returned if the field name is not an ADAM key.
If the ADAM option (command option 2 = V) is used, the value buffer contains the value of the ADAM key.
ISN 4 in file 2 is to be deleted.
Command Code E1
File Number 2 (record to be deleted is in file 2)
ISN 4 (record with ISN 4 to be deleted)
Command Option 1 b (Return Option not to be used)
Additions 3 Password (file 2 is security protected)
A set of ISNs (which were previously selected with a FIND command) is to be deleted from file 1.
Command Code E1
File Number 1 (record to be deleted is in file 1)
ISN n (ISN resulting from previous Find)
Command Option 1 b (Return Option not to be used)
Additions 3 bbbbbbbb (file is not security protected)
The E1 command is repeated for each ISN which resulted from the FIND command.