Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> problem with utl_f***.put :-((
Hi,
we work on RDBMS 8.04 and I have the following problem with the utl_file package: I want to write a DTAZV file (CR/LF forbidden!!). So I can't use utl_file.put_line. Instead I tried utl_file.put. I'm aware of the 1023 bufsiz Problem, so the procedure below works with 1023 Bytes chunks. Executing that stuff fails with "write_error". But when I replace utl_file.put with utl_file.put_line all works nice!!!! So my guess is that I simply can't write files without CR/LF :-((
Anyone
[ ] can confirm this
[ ] has a workaround (intermediate file close?!)
[ ] bug fix
please help. Thank you.
PROCEDURE put
(
file_in IN UTL_FILE.FILE_TYPE,
line_in IN VARCHAR2
)
IS
c_buf_siz NUMBER := 1023; v_beg NUMBER := 1; v_line_len NUMBER := LENGTH(line_in);BEGIN
EXIT WHEN v_beg > v_line_len; UTL_FILE.PUT (file_in, SUBSTR(line_in, v_beg, v_beg + c_buf_siz - 1)); v_beg := v_beg + c_buf_siz;
trace('invalid_path'); RAISE; WHEN utl_file.invalid_mode THEN trace('invalid_mode'); RAISE; WHEN utl_file.invalid_filehandle THEN trace('invalid_filehandle'); RAISE; WHEN utl_file.invalid_operation THEN trace('invalid_operation'); RAISE; WHEN utl_file.read_error THEN trace('read_error'); RAISE; WHEN utl_file.write_error THEN trace('write_error'); RAISE; WHEN utl_file.internal_error THEN trace('internal_error'); RAISE; WHEN no_data_found THEN trace('no_data_found'); RAISE; WHEN value_error THEN trace('value_error'); RAISE; WHEN others THEN trace('others'); RAISE;
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Wed Jul 14 1999 - 09:00:05 CDT