There is no equivalent of DBMS_OUTPUT.PUT_LINE in DB2.
The workaround is write all you debug messages to a file in the
procedure or have a table for storing debug messages!
DB2 provides with one MESSAGE_TEXT which can store the customized
information when an exception occurs. This is useful only in cases where
you would like to return an error message from the procedure instead of
SQLSTATE or SQLCODE.
-----Original Message-----
From: Regis Biassala [mailto:Regis.[Email Address Removed] Tuesday, March 16, 2004 7:12 PM
To: [Email Address Removed] simple question
How do you output data in db2 ?
Example in Oracle:
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
2 p_name VARCHAR2(10):='Oracle';
3 BEGIN
4 dbms_output.put_line(p_name);
5 END;
6 /
Oracle
PL/SQL procedure successfully completed.
Basically, I want to print out value of text when my SQL PL stored
procedure runs...This just for debugging purposes..
Thanks,
Regis
*********************************************************************
This electronic transmission is strictly confidential and intended
solely for the addressee. It may contain information which is covered by
legal, professional or other privilege. If you are not the intended
addressee, you must not disclose, copy or take any action in reliance of
this transmission. If you have received this transmission in error,
please notify the sender as soon as possible.
This footnote also confirms that this message has been swept for
computer viruses.
**********************************************************************
DISCLAIMER:
This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
DB2 & UDB email list listserv db2-l LazyDBA home page