REM This script flags objects to be reloaded for MR3 Upgrade 

DECLARE 

BEGIN 

-- UPDATES THE OBJECTS IN THE FOLLOWING STAGES

-- JRPACK   -- already done
-- CKPACCOM -- already done
-- CKPACK   -- already done
	
	-- UPDATE for PACKAGE BODIES	
	UPDATE CK_INSTALLED_OBJECTS 		
	SET CI_CREATED = 'R'		
	WHERE  CI_TYPE = 'PACKAGE BODY'		
	AND    CI_NAME IN ( 'JR_ACC_RIGHTS'
                      , 'CDAPI'
                      , 'JR_WASTEBASKET'
                      , 'CIHCOL'
                      , 'CIHDBI'
                      , 'CKOVWUTL' );
	
	
	-- Update for verify of stage
	UPDATE CK_INSTALLED_OBJECTS 
	SET    CI_CREATED = 'Y'
	WHERE  CI_STAGE   = 'CKUPDMR3';
	
	COMMIT;
	
EXCEPTION

  WHEN OTHERS THEN 

     dbms_output.put_line('* Exception Raised  ');
     dbms_output.put_line('...ERROR: '||substrb(sqlerrm,1,240));
     rollback work;
     RAISE;

END;
/
