Toad World® Forums

Output Parameter Error - DB2 Beta 6.1.0.136

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,

Robert

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.

Thanks,

Jeff

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.

CALL "SYSPROC"."RTK_TEST"(@SQLCODE_OUT, @SQLSTATE_OUT, @TOKEN_STRING);

COMMIT;

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

Top is version 5.6.0.2916 (successful and shows the col1 value)

Bottom is version 6.1.01.136

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.

CALL "SYSPROC"."RTK_TEST"(@@SQLCODE_OUT, @@SQLSTATE_OUT,@ @TOKEN_STRING);

COMMIT;

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.

[View:/cfs-file/__key/communityserver-discussions-components-files/88/3603.DLL.sql:320:240]

Robert,

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!

Robert