create or replace procedure proc2 is
vfileID utl_file.file_type;
vstring varchar2(100);
vcode varchar2(10);
vname varchar2(10);
begin
vfileID:=utl_file.fopen('D:\','pra1.DAT','R');
loop
utl_file.Get_line(vfileID,vstring);
vcode :=substr (vstring,1,2);
vname :=substr(vstring,4);
insert into hari(code,name)
values(vcode,vname);
commit;
end loop;
EXCEPTION
when NO_DATA_FOUND then
utl_file.fclose(vfileID);
end;