__IF_EXISTS__
SELECT 1
  FROM CI_UT_INSTL_DTL
WHERE SCRIPT_FILE_NAME = 'FW45010_APDATA_UGBUPD-10242_OUAF-36802.SQL'
   AND END_DTTM IS NOT NULL
/
__THEN__
__EXIT__
__ENDIF__


-- Update the batch control if you find a Batch Run instance. 

__IF_EXISTS__
select 1 from CI_BATCH_RUN where BATCH_CD = 'F1DEPLPX'
/

__THEN__
update CI_BATCH_CTRL set OWNER_FLG = 'CM' where BATCH_CD = 'F1DEPLPX'
/
update CI_BATCH_CTRL_L set OWNER_FLG = 'CM' where BATCH_CD = 'F1DEPLPX'
/
UPDATE CI_BATCH_CTRL_L SET DESCR = DESCR || ' (Deprecated)', DESCRLONG = 'This Batch Control is no longer supported.  It is retained for backward compatibility reasons only. ' || DESCRLONG WHERE BATCH_CD = 'F1DEPLPX' AND LANGUAGE_CD = 'ENG'
/
update CI_BATCH_CTRL_P set OWNER_FLG = 'CM' where BATCH_CD = 'F1DEPLPX'
/
update CI_BATCH_CTRL_P_L set OWNER_FLG = 'CM' where BATCH_CD = 'F1DEPLPX'
/
__ELSE__
__ENDIF__


