Permanently removes one or more data records from an indexed or relative data file, a Oracle CODASYL DBMS database, or a relational database. Format ERASE [ALL [OF rse] ]
1 – Arguments
ALL Causes DEC DATATRIEVE to permanently remove from the data file every record in the current collection. ALL OF rse Causes DEC DATATRIEVE to permanently remove from the data file every record identified by the record selection expression.
2 – Examples
The following example shows how to erase all the yachts built by Albin: DTR> FIND YACHTS WITH BUILDER EQ "ALBIN" [3 records found] DTR> ERASE ALL In the following example, a procedure is defined that erases selected yachts: DTR> DEFINE PROCEDURE SELL_BOAT DFN> FIND YACHTS WITH BUILDER EQ *.BUILDER AND DFN> MODEL = *.MODEL DFN> PRINT ALL DFN> IF *."Y IF BOAT SOLD" CONT "Y" THEN ERASE ALL DFN> END_PROCEDURE DTR>