End of file
Date: Tue, 22 Aug 2000 16:44:45 GMT
Message-ID: <8nualn$q7i$1_at_nnrp1.deja.com>
Hello
[Quoted] I am trying to read in lines of data from a text file. I am using the following as a test.
PROCEDURE test IS
in_file TEXT_IO.FILE_TYPE;
line_buf VARCHAR2(10);
counter NUMBER(2);
BEGIN
in_file := TEXT_IO.FOPEN('C:\temp\test.txt', 'r');
counter := 0;
LOOP
counter := counter + 1;
EXIT WHEN counter > 11;
TEXT_IO.GET_LINE(in_file, line_buf);
TEXT_IO.PUT_LINE('out put line is ' || line_buf);
IF line_buf IS NULL THEN
TEXT_IO.PUT_LINE('line buf is null');
END IF;
END LOOP;
END;
How can I determine when I have hit the end of file? I have looked in
the documentation but cannot find anything that looks like it will
work. Any help would be appreciated. Any comments would be welcome if
there is anything else I should be checking for.
Thanks
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Aug 22 2000 - 18:44:45 CEST