TEXT_IO package
create or replace PROCEDURE write_name IS text_file TEXT_IO.FILE_TYPE;
BEGIN
TEXT_IO.PUT_LINE ('c:\name.txt');
text_file := TEXT_IO.FOPEN ('c:\name.txt','W');
TEXT_IO.PUT_LINE ('opened the file.');
TEXT_IO.PUT_LINE (text_file, 'ABC');
TEXT_IO.PUT_LINE ('data to the file.');
TEXT_IO.FCLOSE (text_file);
TEXT_IO.PUT_LINE ('closed.');
EXCEPTION
WHEN others THEN TEXT_IO.PUT_LINE ('Some other error occurred.');
END;
/
show error
Related examples in the same category