Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 22nd, 2006, 03:35 AM
no_spam_for_gman
Guest
 
Posts: n/a
Default 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.

  #2  
Old November 22nd, 2006, 05:25 AM
Ian
Guest
 
Posts: n/a
Default Re: print statement

no_spam_for_gman wrote:
Quote:
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.

  #3  
Old November 22nd, 2006, 12:35 PM
Serge Rielau
Guest
 
Posts: n/a
Default Re: print statement

Ian wrote:
Quote:
no_spam_for_gman wrote:
Quote:
>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
  #4  
Old November 22nd, 2006, 05:25 PM
no_spam_for_gman
Guest
 
Posts: n/a
Default Re: print statement

Thank all for prompt response.

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles