MOVE WS-SEARCH-EMP-NUM TO EMPLOYEE-NUM
OBTAIN CALC EMPLOYEE-REC
IF DB-REC-NOT-FOUND
  DISPLAY ‘ EMPLOYEE-NUM=‘ EMPLOYEE-NUM ‘ WAS NOT FOUND’
ELSE
   PERFORM IDMS-STATUS
   DISPLAY ‘ EMPLOYEE-NUM=‘ EMPLOYEE-NUM
   IF EMPLOYEE-JOBHIST NOT EMPTY
      DISPLAY ‘CANNOT ERASE UNTIL MEMBERS ARE DELETED’
   ELSE
      ERASE EMPLOYEE-REC
      PERFORM IDMS-STATUS
   END-IF
END-IF
