[unixODBC-support] inputOutput parameter problem in calling stored Procedure
bnicolotti at siapcn.it
Tue Feb 17 11:36:29 GMT 2009
yeees, you were right again.
I've followed what's done here (I hadn't searched anything for java):
and I've created a wrapped stored procedure to call the rpg program PROVA:
CREATE PROCEDURE PROVACSSP(INOUT input1 CHARACTER(2)) RESULT SETS 0
LANGUAGE SQL SPECIFIC PROVACSSP NOT DETERMINISTIC
MODIFIES SQL DATA CALL GIANLUCA/PROVAcs(input1)
Procedura PROVACSSP creata in VIAGGIFAP.
and it works. see this source:
Now I'm trying to get the output value of the parameter, but if i set the
parameter as SQL_INPUT_OUTPUT in SQLBindParameters, with all the rest
unchanged I got:
bart at LxPC37:~/download/software/mono/src/test$ ./helloODBCPrepStoredP Dunkel
Here2 param1 before AA!!
Error code: 1
Failure because: exec direct
and from the unixodbc.log:
Statement = 0x80690e0
DIAG  [IBM][iSeries Access ODBC Driver]Colonna 1: CWBNL0203 -
cwbcomsg.dll(93084) codeset=ISO-8859-1 path=/opt/ibm/iSeriesAccess/mri2932/
DIAG  [IBM][iSeries Access ODBC Driver]Troncamento a destra dei
the message translated from italian back to english is Right truncation of
I've sniffed the net and it seems that the return value ('BB') arrives to my
Could you please have a look to see if there's some other parameter missing
Martin Evans-4 wrote:
> Bartolomeo Nicolotti wrote:
>> I've tried with a C program
>> helloODBCPrepStoredP.c that calls a stored procedure (better and RPG
>> program on iseries) and I got:
>> bart at LxPC37:~/download/software/mono/src/test$ ./helloODBCPrepStoredP
>> siapbn siapbn75
>> Error code: -1
>> Failure because: prepare:
>> and from unixodbc log.
>> Statement = 0x80690e0
>> SQL = [CALL GIANLUCA.PROVACS(?)][length = 24 (SQL_NTS)]
>> DIAG [S0002] [IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0204 -
>> in GIANLUCA di tipo *N non trovato.
>> The message, is the same as with mono, and in the iseries slang means
>> it searches for a procedure with no parameters (*N), and it doesn't find
>> as the procedure PROVACS has been built for test purpose only, has 1
>> parameter of type char and it's not overloaded.
>> I think that the driver lacks the possibility of doing prepared
>> that call stored procedures, or there's some other way of doing this.
>> My pc is 32 bit, the iseries system uses ebcdic and the number of bits on
>> iseries is not so easy to know, I think 48bits, yes the iseries is a
>> Many thanks
>> Best regards.
> It would appear you are not alone:
> I found the comment about if you define a procedure with an input
> parameter of char(8) you MUST call the procedure with char(8) interesting.
> This looked very promising:
> Good Luck.
> Martin J. Evans
> Easysoft Limited
> unixODBC-support mailing list
> unixODBC-support at mailman.unixodbc.org
View this message in context: http://www.nabble.com/inputOutput-parameter-problem-in-calling-stored-Procedure-tp22002537p22055413.html
Sent from the unixODBC - Support mailing list archive at Nabble.com.
More information about the unixODBC-support