Register / Login
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
WMB ESQL and DB question
posted 7 years ago
I am intentionally trying to insert on top of a previously entered
row to see how to handle exceptions
I sent the following command in ESQL
SET cmd = 'INSERT into db2inst1.catalog (pid,price) values (1,1)'; SET OutputLocalEnvironment.Variables.Ret = PASSTHRU(cmd);
This works the first time, but the second time through the code
throughs an exception, and goes out the Failure terminal, where I
can see it in the Trace node
When I UN-CHECK the "Throuw exception on Database error", the flow
no longer throws an error, the output routes through the "Out" terminal
The first time through (on an empty table, successfull insert, the
--- Local Env:( ['MQROOT' : 0x1f5d26c0] (0x01000000:Name):Variables = )^M --- Env:^M --- Excpt:^M --------------------------
On the second time through (bad insert cmd trying to overwrite a record),
it agains goes through the 'out' terminal, and the trace node shows:
--- Local Env:^M --- Env:^M --- Excpt:^M --------------------------
In the first case I see a local env, but not the "Ret" I was trying to
In the second case I do not see a local env of any sort
SInce both cases do not show a RET, I can not
ret inside of ESQL to
determine if the INSERT completed successfully
How can I do this ?
It is sorta covered in the
JavaRanch Style Guide
Boost this thread!
Returning String array from C program to Java(JNI)
What is the result?
Unable to pass jlongArray back to Java
IBM MQSI V2 and Oracle 8i Question