TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
116 Chapter4
Using the Database
Deleting Data Entries
For additional information, refer to the discussion of DBDELETE in chapter 5 and the
description of the DBUTIL >>ENABLE command in chapter 8.
Access Modes and User Class Numbers
To update data items, the database must be opened with access mode 1, 3, or 4. If it is
opened with access mode 1, the DBLOCK procedure must be used to lock the detail data
entry, data set, or database before an entry can be deleted and DBUNLOCK should be called
after one or all desired entries have been deleted. As a general rule, the lock should be
established before the whole delete sequence, that is, before the call to DBGET that
establishes which record is to be deleted. This will ensure that another user does not delete
the data entry between the call to DBGET and the call to DBDELETE.
An entry cannot be deleted from a data set unless the user has write access to the data set.
Write access to the data set means the database was opened in a write access mode and
the user class number associated with the DBOPEN password is on the set write class list.