-- DELETE FROM F1_BUS_OBJ_STATUS_ALG
DELETE FROM F1_BUS_OBJ_STATUS_ALG WHERE BUS_OBJ_CD = 'F1-MigrDataSetExport' AND BO_STATUS_CD = 'PENDING' AND BO_STATUS_SEVT_FLG = 'F1EN' AND OWNER_FLG = 'CM';
DELETE FROM F1_BUS_OBJ_STATUS_ALG WHERE BUS_OBJ_CD = 'F1-MigrDataSetImport' AND BO_STATUS_CD = 'PENDING' AND BO_STATUS_SEVT_FLG = 'F1EN' AND OWNER_FLG = 'CM';
DELETE FROM F1_BUS_OBJ_STATUS_ALG WHERE BUS_OBJ_CD = 'F1-MigrDataSetImport' AND BO_STATUS_CD = 'READY2COMP' AND BO_STATUS_SEVT_FLG = 'F1EN' AND OWNER_FLG = 'CM';
DELETE FROM F1_BUS_OBJ_STATUS_ALG WHERE BUS_OBJ_CD = 'F1-MigrDataSetImport' AND BO_STATUS_CD = 'READY2APPLY' AND BO_STATUS_SEVT_FLG = 'F1EN' AND OWNER_FLG = 'CM';
DELETE FROM F1_BUS_OBJ_STATUS_ALG WHERE BUS_OBJ_CD = 'F1-MigrDataSetImport' AND BO_STATUS_CD = 'APPLYING' AND BO_STATUS_SEVT_FLG = 'F1EN' AND OWNER_FLG = 'CM';

-- INSERT INTO F1_BUS_OBJ_STATUS_ALG
INSERT INTO F1_BUS_OBJ_STATUS_ALG (BUS_OBJ_CD,BO_STATUS_CD,BO_STATUS_SEVT_FLG,SEQ_NUM,ALG_CD,VERSION,OWNER_FLG) VALUES ('F1-MigrDataSetExport          ','PENDING     ','F1EN',10,'F1-MGDPR-SJ ',1,'CM  ');
INSERT INTO F1_BUS_OBJ_STATUS_ALG (BUS_OBJ_CD,BO_STATUS_CD,BO_STATUS_SEVT_FLG,SEQ_NUM,ALG_CD,VERSION,OWNER_FLG) VALUES ('F1-MigrDataSetImport          ','PENDING     ','F1EN',10,'F1-MGDIM-SJ ',1,'CM  ');
INSERT INTO F1_BUS_OBJ_STATUS_ALG (BUS_OBJ_CD,BO_STATUS_CD,BO_STATUS_SEVT_FLG,SEQ_NUM,ALG_CD,VERSION,OWNER_FLG) VALUES ('F1-MigrDataSetImport          ','READY2COMP  ','F1EN',2,'F1-MGOPR-SJ ',1,'CM  ');
INSERT INTO F1_BUS_OBJ_STATUS_ALG (BUS_OBJ_CD,BO_STATUS_CD,BO_STATUS_SEVT_FLG,SEQ_NUM,ALG_CD,VERSION,OWNER_FLG) VALUES ('F1-MigrDataSetImport          ','READY2APPLY ','F1EN',30,'F1-MGOAP-SJ ',1,'CM  ');
INSERT INTO F1_BUS_OBJ_STATUS_ALG (BUS_OBJ_CD,BO_STATUS_CD,BO_STATUS_SEVT_FLG,SEQ_NUM,ALG_CD,VERSION,OWNER_FLG) VALUES ('F1-MigrDataSetImport          ','APPLYING    ','F1EN',20,'F1-MGTAP-SJ ',1,'CM  ');

-- DELETE FROM CI_BATCH_CTRL_ALG
DELETE FROM CI_BATCH_CTRL_ALG WHERE BATCH_CD IN ('F1-MGOPR','F1-MGTPR','F1-MGOAP','F1-MGTAP') AND OWNER_FLG = 'CM';

-- INSERT INTO CI_BATCH_CTRL_ALG
INSERT INTO CI_BATCH_CTRL_ALG (BATCH_CD,F1_BATCH_CTRL_SEVT_FLG,SEQ_NUM,ALG_CD,OWNER_FLG,VERSION) VALUES ('F1-MGOAP','F1BF',10,'F1-MGDIM-NJ ','CM  ',1);
INSERT INTO CI_BATCH_CTRL_ALG (BATCH_CD,F1_BATCH_CTRL_SEVT_FLG,SEQ_NUM,ALG_CD,OWNER_FLG,VERSION) VALUES ('F1-MGOPR','F1BF',10,'F1-MGTPR-NJ ','CM  ',1);
INSERT INTO CI_BATCH_CTRL_ALG (BATCH_CD,F1_BATCH_CTRL_SEVT_FLG,SEQ_NUM,ALG_CD,OWNER_FLG,VERSION) VALUES ('F1-MGTAP','F1BF',10,'F1-MGDIM-NJ ','CM  ',1);
INSERT INTO CI_BATCH_CTRL_ALG (BATCH_CD,F1_BATCH_CTRL_SEVT_FLG,SEQ_NUM,ALG_CD,OWNER_FLG,VERSION) VALUES ('F1-MGTPR','F1BF',10,'F1-MGDIM-NJ ','CM  ',1);