__IF_EXISTS__
SELECT 1
  FROM CI_UT_INSTL_DTL
WHERE SCRIPT_FILE_NAME = 'FW45001_APDATA_UGBUPD-651.SQL'
   AND END_DTTM IS NOT NULL
/
__THEN__
__EXIT__
__ENDIF__

__IF_EXISTS__
select 1 from CI_BATCH_RUN where BATCH_CD = 'F1-AVALG'
/

__THEN__
update CI_BATCH_CTRL set OWNER_FLG = 'CM', APP_SVC_ID = 'F1-DFLTS' where BATCH_CD = 'F1-AVALG'
/
update CI_BATCH_CTRL_L set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVALG'
/
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 = 'F1-AVALG' AND LANGUAGE_CD = 'ENG'
/
update CI_BATCH_CTRL_P set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVALG'
/
update CI_BATCH_CTRL_P_L set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVALG'
/
__ELSE__
__ENDIF__


__IF_EXISTS__
select 1 from CI_BATCH_RUN where BATCH_CD = 'F1-AVBT'
/

__THEN__
update CI_BATCH_CTRL set OWNER_FLG = 'CM', APP_SVC_ID = 'F1-DFLTS' where BATCH_CD = 'F1-AVBT'
/
update CI_BATCH_CTRL_L set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVBT'
/
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 = 'F1-AVBT' AND LANGUAGE_CD = 'ENG'
/
update CI_BATCH_CTRL_P set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVBT'
/
update CI_BATCH_CTRL_P_L set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVBT'
/
__ELSE__
__ENDIF__


__IF_EXISTS__
select 1 from CI_BATCH_RUN where BATCH_CD = 'F1-AVMO'
/

__THEN__
update CI_BATCH_CTRL set OWNER_FLG = 'CM', APP_SVC_ID = 'F1-DFLTS' where BATCH_CD = 'F1-AVMO'
/
update CI_BATCH_CTRL_L set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVMO'
/
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 = 'F1-AVMO' AND LANGUAGE_CD = 'ENG'
/
update CI_BATCH_CTRL_P set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVMO'
/
update CI_BATCH_CTRL_P_L set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVMO'
/
__ELSE__
__ENDIF__


__IF_EXISTS__
select 1 from CI_BATCH_RUN where BATCH_CD = 'F1-AVTBL'
/

__THEN__
update CI_BATCH_CTRL set OWNER_FLG = 'CM', APP_SVC_ID = 'F1-DFLTS' where BATCH_CD = 'F1-AVTBL'
/
update CI_BATCH_CTRL_L set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVTBL'
/
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 = 'F1-AVTBL' AND LANGUAGE_CD = 'ENG'
/
update CI_BATCH_CTRL_P set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVTBL'
/
update CI_BATCH_CTRL_P_L set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVTBL'
/
__ELSE__
__ENDIF__


__IF_EXISTS__
select 1 from CI_BATCH_RUN where BATCH_CD = 'F1-AVTD'
/

__THEN__
update CI_BATCH_CTRL set OWNER_FLG = 'CM', APP_SVC_ID = 'F1-DFLTS' where BATCH_CD = 'F1-AVTD'
/
update CI_BATCH_CTRL_L set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVTD'
/
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 = 'F1-AVTD' AND LANGUAGE_CD = 'ENG'
/
update CI_BATCH_CTRL_P set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVTD'
/
update CI_BATCH_CTRL_P_L set OWNER_FLG = 'CM' where BATCH_CD = 'F1-AVTD'
/
__ELSE__
__ENDIF__
