begin
execute immediate 'alter session enable parallel dml';
/**
* @description initialize variable
* @field-mapping vv_task_name = ('LBI_EDM_VDF.prc_e_a_identity_acct_d')
* @field-mapping vv_table_name = ('LBI_EDM_VDF.t_e_a_identity_acct_d ')
*/
vv_task_name := 'prc_e_fsi_link';
vv_table_name := 't_e_fsi_link';
--vt_default_time := to_date('197001010000','yyyymmddhh24mi');
vi_result := 0;
/**
* @description program begin logging in
* @field-mapping vv_task_pos = ('program begin logging in')
* @call LBI_SYS_VDF#prc_s_sys_log
*/
vv_task_pos := 'program begin logging in';
LBI_SYS_VDF.prc_s_sys_log(vi_task_id,
vv_task_name,
vv_table_name,
iv_start_date,
1,
null,
null);
/**
* @description it will raise customized error exception when static date is null
* @field-mapping vi_err_code = (-1)
* @field-mapping vv_err_msg = ('static date is null')
*/
vv_task_pos := 'check input parameter';
if (iv_start_date is null or iv_end_date is null) then
vi_err_code := -1;
vv_err_msg := 'static date is null';
raise exc_error;
end if;
start_date := to_date(iv_start_date, 'yyyymmddhh24mi');
end_date := to_date(iv_end_date, 'yyyymmddhh24mi');
vv_task_pos := 'clear data of static day';
execute immediate ' truncate table LBI_EDM_VDF.t_e_fsi_link_mid';
execute immediate ' truncate table LBI_EDM_VDF.t_e_fsi_link_mid1';
execute immediate ' truncate table LBI_EDM_VDF.t_e_fsi_link_mid2';