The delete operation allows you to delete an existing database record.
When a database record is deleted, the physical record is marked as deleted. This is true even if the delete operation is done through a logical file. A deleted record cannot be read. The record is removed from all keyed sequence access paths that contain the record. The relative record number of the deleted record remains the same. All other relative record numbers within the physical file member do not change.
The system does not allow you to retrieve the data for a deleted record. You can, however, write a new record to the position (relative record number) associated with a deleted record. The write operation replaces the deleted record with a new record. See your high-level language topic collection for more details about how to write a record to a specific position (relative record number) in the file.
To write a record to the relative record number of a deleted record, that relative record number must exist in the physical file member. You can delete a record in the file using the delete operation in your high-level language. You can also delete records in your file using the Initialize Physical File Member (INZPFM) command. The INZPFM command can initialize the entire physical file member to deleted records.
If the file from which you are deleting has a delete trigger associated with it, the trigger program is called before or after deleting the record.
If the file is part of a referential constraint relationship, record deletion might be affected.