473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

ho w to see the output of "Message_Text"

Hi ,

I would like to know how to we see the output of "MESSAGE_TEXT " .
Below is 1 such procedure ..

create procedure mess_test (out p_sqlstate char(5) , out p_sqlcode
int )
language sql
specific mess_test
begin
declare v_count int;
declare sqlstate char(5) default '00000';
declare sqlcode int default 0;
DECLARE c_too_many_rows CONDITION FOR SQLSTATE '99001';
--declare no_table condition for sqlstate '42704';
declare exit handler for sqlexception
select sqlstate , sqlcode into
p_sqlstate , p_sqlcode
from sysibm.sysdummy1;
select count(*) into v_count from employee;
if v_count 30 then
signal c_too_many_rows set message_text = ' Rows More thena
required ';
end if;

end
DB20000I The SQL command completed successfully.

^C
D:\>db2 call mess_test(?,?)

Value of output parameters
--------------------------
Parameter Name : P_SQLSTATE
Parameter Value : 99001

Parameter Name : P_SQLCODE
Parameter Value : -438

Return Status = 0
D:\>

I am unable to see the " message_text " out put .
How can we see that . Is their any setting to be changed while
executing or calling the procedure ,.
Please let me know about this .
Thanks a lot .
Bikash Karan
Jun 27 '08 #1
1 2535
Try the GET DIAGNOSTICS statement
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Zimri | last post by:
All, I am trying to read an XML of a set of records (an "order") from one machine and then turn it into a set of records on another machine. But some of the order's dependent records are...
3
by: luthriaajay | last post by:
I have an XML like this. <?xml version="1.0" encoding="ISO-8859-1"?> <Criteria> <Messages Code="SSS" Message_Text="Congrats!" /> <Messages Code="JJJ" Message_Text="Bad Luck"/> </Criteria>
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.