File open and close with UTL_FILE package : UTL_FILE « System Packages « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL> DECLARE
  2     lv_file_id_num  UTL_FILE.FILE_TYPE;
  3  BEGIN
  4     lv_file_id_num := UTL_FILE.FOPEN('c:\apps\loaders', 'test4.dat', 'W');
  5     UTL_FILE.FCLOSE(lv_file_id_num);
  6  END;
  7  /



SQL>








31.38.UTL_FILE
31.38.1.File open and close with UTL_FILE package
31.38.2.File open flags
31.38.3.Save table records to a file
31.38.4.Use UTL_FILE package to create a file
31.38.5.Open a file with mode passed in
31.38.6.utl_file.invalid_&&firstparm
31.38.7.UTL_File related exception
31.38.8.UTL_FILE.IS_OPEN
31.38.9.A PL/SQL block to read an operating system file called BLOB.JPG that contains 1 row of binary data.