Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Line length limitations in PL/SQL
Christopher Beck wrote:
>
> On Wed, 14 Oct 1998 17:16:48 -0400, Tansel Ozkan <tansel_at_openix.com>
> wrote:
>
> >Hello,
> >
> >I have to write a PL/SQL program that will output 1300 bytes
> >per record. I have come to learn that DBMS_OUTPUT.PUT_LINE has
> >a limitation of 255 bytes. Then I have looked into UTL_FILE.PUT_LINE
> >and found out that it has a limitation of 1023 bytes per line.
>
> You could write your own wrapper around either dbms_output.put_line
> or utl_file.put_line to chuck up you output into 255 byte size pieces.
Thanks for your input.
But I need 1300 bytes PER LINE. If I am not mistaken, when I use your wrapper, each record will be in more than one lines. This is not what I want. I tried using dbms_output.put instead of dbms_output.put_line function in your wrapper to make it work, but still got the same error message. 'Line longer than 255'
> eg.
>
> procedure my_put_line( p_string varchar2 ) is
> l_string varchar2(32767);
> begin
> l_string := p_string;
> loop
> exit when l_string is null;
> dbms_output.put_line( substr( l_string, 1, 255 ) );
^^^^^^^^^ This will output 255 bytes per line..> end loop;
> l_string := substr( l_string, 256 );