SET ECHO OFF
SET AUTOCOMMIT OFF
SET FEEDBACK OFF
SET VERIFY OFF
SET TERMOUT OFF
SET TRIMSPOOL OFF
SET SHOW OFF


-- ESR CR 7660 Cleanup script.
-- Clean up Cancel/Decline Date Populated by Data Sync.


SET TERMOUT ON
BEGIN
   DBMS_OUTPUT.put_line (' ');
   DBMS_OUTPUT.put_line ('ESR CR 7660 Clean up Cancel/Decline Date Populated by Data Sync.');
   DBMS_OUTPUT.put_line (' ');
END;
/
SET TERMOUT OFF

--1507204 --closed work items
delete from CANCEL_DECLINE
    where CANCEL_DECLINE_EFFECTIVE_DATE is not null 
      	  and CANCEL_DECLINE_IND = '0'
          and RECORD_MODIFIED_BY = 'Job-HECLegacyDataSyncConsumer';
      
SET TERMOUT ON
BEGIN
   DBMS_OUTPUT.PUT_LINE('Cleaned up records that had a Cancel/Decline Date populated by Data Sync');
END;
/
SET TERMOUT OFF

SET TERMOUT ON
BEGIN
   DBMS_OUTPUT.PUT_LINE('Calling uow.sql &1');
END;
/
SET TERMOUT OFF
@@uow.sql &1

SET TERMOUT ON
BEGIN
   DBMS_OUTPUT.PUT_LINE('Done.');
END;
/
SET TERMOUT OFF
-- Reset environment parameters
SET FEEDBACK ON
SET VERIFY ON
SET TERMOUT ON
