Toad World® Forums

Output Parameter Error - DB2 Beta

I have recently noticed an issue with the BETA version of TOAD.

I have an output parameter defined as the following: OUT @SQLCODE_OUT INT

When I call the native nsql store procedure I get the following message:

Category Timestamp Duration Message Line Position
Error 7/15/2015 3:41:28 PM 0:00:01.686 - DB2 Database Error: ERROR [07006] [IBM] CLI0102E Invalid conversion. SQLSTATE=07006. Output parameters data:
@SQLCODE_OUT = {null}

Has anyone else seen this before? In TOAD 5.6 it worked perfectly fine.



Thanks for the information. Can you post the DDL you used to create your procedure. Also are you using the right-click ‘Execute Procedure’ action on the proc from the object explorer? If so, can you post the Toad generated CALL statement that gets opened in the SQL Editor.



Hello Jeff,

Thanks for the reply. Sorry for the delay. I was out on vacation last week and trying to play catch up on Monday and Tuesday. I can give you more information on what I am doing.

Attached is the DDL. I made it real simple. Just an NSQL store procedure.

Here is the call string I am trying to do.



Attached is a screen shot of what both outputs in both versions of Toad.

Top is version (successful and shows the col1 value)

Bottom is version

Let me know if that screen shot does not work for you. Here is the full error message

Category Timestamp Duration Message Line Position
Error 7/29/2015 10:30:39 AM 0:00:01.752 - DB2 Database Error: ERROR [07006] [IBM] CLI0102E Invalid conversion. SQLSTATE=07006. Output parameters data:
@SQLCODE_OUT = {null},
@SQLSTATE_OUT = {null},
@TOKEN_STRING = {null} 1 69

I have been using the right click 'Execute Procedure'. I got a question about that feature. I love this feature, but there is one issue I am running into. I usually always have my parameters start with '@' sign. When I right click it puts a '@' in there too so its double '@@' before the parameter. See code below. I was wondering if the software could check to see if there is an '@' don't put another one in the call string. Sorry that has nothing to do with this issue, but just a wish I have for TOAD.



Thanks for all your help and I hope this gives you enough details. Let me know if you need more. Sorry again for the delay.



Thanks for the detailed information. When I right-click and select execute on that procedure I get a generated script also with the double at-signs @@s.

When I edit that to remove the double-at-signs to be like: CALL "JPODLAS"."POD_RTK_TEST"(@SQLCODE_OUT, @SQLSTATE_OUT, @TOKEN_STRING);

I can run that successfully in our 6.1 beta:

I do get prompted for the entry of bind variable values, as shown below - but I just leave those blank and just hit OK

Do you see that 'bind variable' panel? If so do you enter any values or just hit OK?

When you see your error - are you attempting to run with one or two at-signs as your parms prefixes?

Hello Jeff,

Interesting it works for you. I must have a setting wrong or something.

I get the ‘bind variable’ panel and put nothing in it.

I have tried to execute with 1 single @ and 2 single @ signs.

1 @ Sign I get the original error message from above.

2 @ signs I get a different error message. See screen shot below.

Do you think the software can have some logic to not put in an @ sign for variables if the variable starts with an @ sign?

My issue with being able to execute the code must just be my computer.

Thanks again for your help!