Re: Printing Text in PL/SQL

From: Carlos Augusto Leite Netto <cnetto_at_cps.softex.br>
Date: 1996/01/14
Message-ID: <4dbfs6$rtv_at_tiete.dcc.unicamp.br>#1/1


rest_at_sdm.de (Johannes Rest) wrote:
>Hello!
>
>i'm having difficulties in printing text in PL/SQL. In my current
>project i have to use an PL/SQL-Procedure within an ordinary SQL-Script.
>The PL/SQL Procedure calls an stored procedure, in which error messages
>are generated. Now i need to print out these messages in an log-file.
>Unfortunatet i can't use the text_io package. I tried to use
>the dbms_output package, but it's only use is to write on an
>buffer.

You *can* use dbms_output package. Every time you call put_line this package writes the output in a buffer. When you finish the PL/SQL executing, SQL*Plus automatically reads the entire buffer and writes the contents on standard-output (you need to issue set server output on size <size of the buffer>).

If your output is too long, you can write your own package that uses tables instead of a PL/SQL variable to save the outputs.

Regards,

Carlos Netto
cnetto_at_cps.softex.br
Software Design - Oracle Consultants - Brazil Received on Sun Jan 14 1996 - 00:00:00 CET

Original text of this message