declare
f utl_file.file_type;
s varchar2(200);
begin
f := utl_file.fopen('e:test','sample.txt','R');
loop
utl_file.get_line(f,s);
dbms_output.put_line(s);
end loop;
exception
when NO_DATA_FOUND then
utl_file.fclose(f);
end;