469,286 Members | 2,521 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,286 developers. It's quick & easy.

print statement

Does db2 have the equivalent of a print statement like SQL server? I
wanted to debug a stored procedure I wrote and wanted to output some of
the values. I couldn't find it in documentation...The only thing that
looked close was signal statement.

Nov 22 '06 #1
3 10260
Ian
no_spam_for_gman wrote:
Does db2 have the equivalent of a print statement like SQL server? I
wanted to debug a stored procedure I wrote and wanted to output some of
the values. I couldn't find it in documentation...The only thing that
looked close was signal statement.
No. But you can use Development Center (or Developer Workbench) and
actually debug the stored procedure, which is light years ahead of
using print statements to try and debug.

Nov 22 '06 #2
Ian wrote:
no_spam_for_gman wrote:
>Does db2 have the equivalent of a print statement like SQL server? I
wanted to debug a stored procedure I wrote and wanted to output some of
the values. I couldn't find it in documentation...The only thing that
looked close was signal statement.

No. But you can use Development Center (or Developer Workbench) and
actually debug the stored procedure, which is light years ahead of
using print statements to try and debug.
For reporting (or if you just are in love with print statements you can
use a DECLARE GLOBAL TEMPORARY TABLE ... NOT LOGGED .. ON ROLLBACK
PRESERVE ROWS
and dump your stuff into that.
Then at the end of your stored proc simply open a CURSOR WITH RETURN TO
CLIENT on the temp table. command line will display it.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

WAIUG Conference
http://www.iiug.org/waiug/present/Fo...Forum2006.html
Nov 22 '06 #3
Thank all for prompt response.

Nov 22 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by mmccaws | last post: by
30 posts views Thread by Martin Bless | last post: by
12 posts views Thread by Michael Foord | last post: by
14 posts views Thread by Marcin Ciura | last post: by
2 posts views Thread by jamesthiele.usenet | last post: by
69 posts views Thread by Edward K Ream | last post: by
2 posts views Thread by Phoe6 | last post: by
5 posts views Thread by xirowei | last post: by
7 posts views Thread by samslists | last post: by
10 posts views Thread by Prisoner at War | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.