Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Using DBMS_OUTPUT in ProC
You would begin with a call to dbms_output.enable, for example:
...
exec sql execute
begin
dbms_output.enable( 1000000 );
end;
end-exec;
....
You would then execute something that creates output in the dbms_output area using dbms_output.put_line. After it was done executing, you would call dbms_output.get_line(s). For example:
...
exec sql begin declare section;
VARCHAR line[256]; int status;
for( ;; ) { exec sql execute begin dbms_output.get_line( :line, :status ); end; end-exec; if ( status ) break; printf( "%.*s\n", line.len, line.arr ); }
This is pretty much what sql*plus/sqldba and svrmgrl do. There does exist an array interface to dbms_output.get_lines which would be more efficient for large 'results' from dbms_output....
On Thu, 24 Apr 1997 10:01:51 -0600, kent.primrose_at_dg19.cec.be wrote:
>In a ProC program I would like to get output from DBMS_OUTPUT. I have a
>DBMS_OUTPUT.ENABLE statement followed by a DBMS_OUTPUT.PUT_LINE
>statement. Everything compiles and runs fine, just no apparent output.
>
>I'm running in UNIX and have not re-directed STDOUT or STDERR. Any good
>ideas?
>
>Kent
>
>-------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD
http://govt.us.oracle.com/ -- downloadable utilities
![]() |
![]() |