Previous Topic: @ERASE (LRF) Status CodesNext Topic: @FIND/@OBTAIN Statements—accesses database records


@ERASE (LRF) Example

The example below illustrates a request to erase the OFFEMPLR logical record for office 012's employee ID 1234.

In this example, the DBA has designated the keyword DELETE-EMPLOYEE to direct the request to the path designed to retrieve the appropriate OFFEMPLR logical record and to delete the indicated employee information from the database.

@ERASE REC=OFFEMPLR,                                          *
      ONLRSTS='NO-OFFICE',GOTO=END,                           *
      WHERE OFFCODE EQ '012'                                  *
      AND EMPID EQ '1234'                                     *
      AND DELETE-EMPLOYEE