Use utl_file.fopen to open a file
SQL> SQL> declare 2 l_file_handle utl_file.file_type; 3 begin 4 l_file_handle := utl_file.fopen( '/tmp', 'tom.data', 'w' ); 5 end; 6 / SQL> --