473,657 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

print value during execution stored procedure

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
2 23988
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2401
by: Manfred Schwab | last post by:
Recording messages and print statements in a textfile during program execution. Is there a similar command to redirect errormessages or print statements into a standart asciifile during programm execution. I would like to echo the complete console output into a textfile and send this file as email at a certain point in time. The programm execution shall not be stopped.
6
2316
by: Wim van Rosmalen | last post by:
I've upgraded MS-Access 2002 to a MS-Access Project (adp), so now I have to deal with more sophisticated queries (may I call them so?) like stored procedures. I have a form with a combobox for selections and a textbox to enter a certain value. Let us say I call the combobox @select and the textbox @find. The combobox always shows the first of the items to select. Now I want to return a message if nothing is found, or if nothing has been...
2
3648
by: Oleg | last post by:
I am trying to send one of the parameters of stored procedure having a null value. The parameter is of type blob. I declare it in code like 'new OleDbParameter ("p_sigPicture", OleDbType.LongVarBinary)'. The result of execution is exception: 'Stored Procedure is not found'. I don't want to make another stored procedure for the case when the is no parameter to pass. What can I do to pass a null value?
1
1556
by: Wim van Rosmalen | last post by:
Hi folks, I've upgraded MS-Access 2002 to a MS-Access Project (adp), so now I have to deal with more sophisticated queries (may I call them so?) like stored procedures. I have a form with a combobox for selections and a textbox to enter a certain value. Let us say I call the combobox @select and the textbox @find. The combobox always shows the first of the items to select. Now I want to return a message if nothing is found, or if...
1
394
by: Venkat | last post by:
Hi, Is there any way to give feedback to the application while a stored procedure execution is in progress? I am using sql server and my application is built using c#. The stored procedure tries to delete around 200K records and there is no way to give the progress of the deletion to the user. Some times i get time out error as it takes much time. Is there any way to give feedback as well to keep alive the stored procedure execution...
4
6957
by: TheRealPawn | last post by:
I'm trying to get the execution plan for a single stored procedure from Profiler. Now, I've isolated the procedure but I get all execution plans. Any ideas on how to connect the SPIDs so that I only get the execution plan for the procedure I'm watching and not the whole of the server?
16
1803
by: Wade Ward | last post by:
/* C version */ static unsigned long t,x=123456789,y=362436069,z=21288629,w=14921776,c=0; unsigned long KISS(){ x+=545925293; y^=(y<<13); y^=(y>>17); y^=(y<<5); t=z+w+c; z=w; c=(t>>31); w=t&2147483647; return(x+y+w); } What would be an appropriate caller for this function. Am I correct that the static specifier has the function remembering its older
5
10746
by: sqlgirl | last post by:
Hi, We are trying to solve a real puzzle. We have a stored procedure that exhibits *drastically* different execution times depending on how its executed. When run from QA, it can take as little as 3 seconds. When it is called from an Excel vba application, it can take up to 180 seconds. Although, at other times, it can take as little as 20 seconds from Excel.
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.