The EGL delete statement provides the fundamental "delete" capability for the language. It removes a record from a file, a row from a relational database, or a segment from a hierarchical database.
In most cases, you must place a hold on a record before you can delete it. To place a hold on a record, use the get statement with the forUpdate option.
The exact behavior of the statement depends on the way you have stereotyped your record variable (see Stereotypes).

In the following example, the user has submitted a request to delete a displayed record. The program must get and hold the record variable containing the specified information before deleting the record:
if (userRequest == "D")
try
get myCustomer forUpdate;
onException(ex AnyException)
myErrorHandler(ex); // exits the program
end
try
delete myCustomer;
onException(ex AnyException)
myErrorHandler(ex);
end
end