Previous Topic: REMOVE ROW FROM StatementNext Topic: REMOVE from Sort String


REMOVE with DELETE Action

 --- EVENT ACTION delete_department_pd_delete_click
|    GET ROW HIGHLIGHTED IN export_department STARTING AT 1
|         GIVING SUBSCRIPT OF export_department
|
|     --- IF SUBSCRIPT OF export_department IS GREATER THAN 0
|    |
|    |     --- READ department
|    |    |        WHERE DESIRED department number IS EQUAL TO
|    |    |            input_department department number
|    |    |--- WHEN successful
|    |    |    REMOVE ROW FROM export_department AT SUBSCRIPT OF
|    |    |        export_department
|    |    |    DELETE department
|    |    |--- WHEN not found
|    |    |    EXIT STATE IS department_not_found WITH ROLLBACK
|    |     ---
|     ---
 ---

The sample code shows the deletion of a department entity from the database and the updating of the group view through a refreshing READ.

Another example using REMOVE is shown in the next sample code.