create or replace procedure dm.P_main_proc_bak(begin_date VARCHAR2,
                                        end_date VARCHAR2,
                                        proc_name varchar2) IS
day_count NUMBER;  
pram1 VARCHAR2(300);
pram2 VARCHAR2(300);
temp_str varchar2(300); 
sql_str LONG;                                                                  
begin
  day_count:=to_date(end_date,'yyyymmdd')-to_date(begin_date,'yyyymmdd');
  FOR counter IN 0..day_count
  LOOP
  temp_str:=TO_CHAR(TO_DATE(begin_date,'YYYYMMDD')+counter,'YYYYMMDD');
  sql_str:= 'call '||proc_name||'(:V1,:V2,:V3)';
  EXECUTE IMMEDIATE sql_str USING in temp_str,out pram1,out pram2;
  --execute IMMEDIATE 'call '||proc_name||'(:V1,:V2,:V3)' using in temp_str,out pram1,out pram2;
 dbms_output.put_line(temp_str);
 END LOOP;
end P_main_proc_bak;