Get a line from a file with UTL_FILE package : File Read with UTL_FILE « System Packages « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL> CREATE OR REPLACE PROCEDURE get_line(file_in IN UTL_FILE.FILE_TYPE, line_out OUT VARCHAR2, eof_out OUT BOOLEAN)
  2  IS
  3  BEGIN
  4     UTL_FILE.GET_LINE (file_in, line_out);
  5     eof_out := FALSE;
  6  EXCEPTION
  7     WHEN NO_DATA_FOUND
  8     THEN
  9        line_out := NULL;
 10        eof_out  := TRUE;
 11  END;
 12  /


SQL>
SQL>








31.33.File Read with UTL_FILE
31.33.1.Show file content
31.33.2.Get a line from a file with UTL_FILE package
31.33.3.Read file
31.33.4.Read from the CLOB in chunks of 1000 characters and write to the output file