DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: UTL_FILE

  1. #1
    Join Date
    Jan 2001
    Posts
    515
    Does anyone know a way to work around the 1023 byte max size of a record that can be written to a file using the utl_file.putf procedure?

  2. #2
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    since Oracle 8 onwards, there is an overloaded version of fopen :

    UTL_FILE.FOPEN(
    location IN VARCHAR2,
    filemane IN VARCHAR2,
    open_mode IN VARCHAR2,
    max_linesize IN BINARY_INTEGER)
    RETURN file_type;

    max_linesize is the max number of characters per line, min value is 1, max is 32767, that way you can write the number of characters you want

  3. #3
    Join Date
    Jan 2001
    Posts
    515

    thanks..

    Thanks for the help. I seems to be working.

  4. #4
    Join Date
    Mar 2000
    Location
    Chennai.Tamilnadu.India.
    Posts
    658

    More info

    Hi, 22nd May 2001 21:23 hrs chennai

    You can see all the Functions and procedures and usage of the UTL_FILE package

    http://www.elementkjournals.com/dbm/0005/dbm0053.htm

    Well fine any how pipo has solved this is for more info on the subject.

    Cheers

    Padmam
    Attitude:Attack every problem with enthusiasam ...as if your survival depends upon it

  5. #5
    Join Date
    Jan 2001
    Posts
    515

    doesn't work

    It turns out that it is not working. It says that the character string buffer is to small.

  6. #6
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    well, there is another problem, but when I tested the answer I gave you, I perfectly wrote a 1500 characters buffer ...

    DECLARE
    file_handle utl_file.file_type;
    text varchar2(1600) := '';
    BEGIN
    file_handle:=utl_file.fopen('C:\TEMP','test.txt','a',30000);
    for i in 1 .. 100
    loop
    text := text || '1234567890ABCDE';
    end loop;
    utl_file.putf(file_handle,'%s',text);
    utl_file.fflush(file_handle);
    utl_file.fclose_all;
    END;
    /

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width