By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,333 Members | 1,226 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,333 IT Pros & Developers. It's quick & easy.

print value during execution stored procedure

P: n/a
Hi,

I am a bit new to db2, and I am unable to find a proper command syntax where
I can print values during execution in a stored procedure

Pls help.

regards,
guillaume
Aug 17 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
GUILLAUME LECOMTE wrote:
I am a bit new to db2, and I am unable to find a proper command syntax where
I can print values during execution in a stored procedure
DB2 does not have a PRINT statement.
If you want to do debugging use the Developer Workbench.
If you want to print a report insert your report data into a temporary
table (DECLARE GLOBAL TEMPORRAY TABLE). Declare a cursor WITH RETURN TO
CLIENT that dumps the temp table and OPEN the cursor before you finish
the stored procedure.
The command line processor will receive the result set (very much like a
query without a cursor in TSQL) and print it out AFTER the procedure is
finished.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Aug 17 '07 #2

P: n/a

Hi Serge,
Thank you very much for the help!... I'll use Developer Workbench (it's more
that i'm searching for)
(sorry for english)
guillaume

"Serge Rielau" <sr*****@ca.ibm.coma écrit dans le message de news:
5i*************@mid.individual.net...
GUILLAUME LECOMTE wrote:
>I am a bit new to db2, and I am unable to find a proper command syntax
where I can print values during execution in a stored procedure
DB2 does not have a PRINT statement.
If you want to do debugging use the Developer Workbench.
If you want to print a report insert your report data into a temporary
table (DECLARE GLOBAL TEMPORRAY TABLE). Declare a cursor WITH RETURN TO
CLIENT that dumps the temp table and OPEN the cursor before you finish the
stored procedure.
The command line processor will receive the result set (very much like a
query without a cursor in TSQL) and print it out AFTER the procedure is
finished.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Aug 17 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.