The following function makes a copy of the record to be deleted from the table named Main in the purge table named Purge:

PROCEDURE DelMainRec

   store automem 

   select PURGE 

   append automem 

   select MAIN 

   blank 

   delete